Commit c5f27a43 authored by Simon Budig's avatar Simon Budig Committed by Simon Budig
Browse files

No need to use an undo_group *and* freeze/thaw an image. Just using the

2004-03-14  Simon Budig  <simon@gimp.org>

	* plug-ins/common/jpeg.c: No need to use an undo_group *and*
	freeze/thaw an image. Just using the latter keeps the undo
	history ok in both directions. Also call gimp_displays_flush()
	to make sure the undo keyboard shortcuts are enabled after the
	plugin ends.
parent 657bd9ff
2004-03-14 Simon Budig <simon@gimp.org>
* plug-ins/common/jpeg.c: No need to use an undo_group *and*
freeze/thaw an image. Just using the latter keeps the undo
history ok in both directions. Also call gimp_displays_flush()
to make sure the undo keyboard shortcuts are enabled after the
plugin ends.
2004-03-14 Simon Budig <simon@gimp.org>
 
* app/core/gimpimage.[ch]
......@@ -494,10 +494,8 @@ run (const gchar *name,
if (jsvals.preview)
{
/* we start an undo_group and immediately freeze undo saving
so that we can avoid sucking up tile cache with our unneeded
preview steps. */
gimp_image_undo_group_start (image_ID);
/* we freeze undo saving so that we can avoid sucking up
* tile cache with our unneeded preview steps. */
gimp_image_undo_freeze (image_ID);
undo_touched = TRUE;
......@@ -513,9 +511,10 @@ run (const gchar *name,
if (undo_touched)
{
/* thaw undo saving and end the undo_group. */
/* thaw undo saving and flush the displays to have them
* reflect the current shortcuts */
gimp_image_undo_thaw (image_ID);
gimp_image_undo_group_end (image_ID);
gimp_displays_flush ();
}
if (!err)
......@@ -1587,10 +1586,8 @@ make_preview (void)
{
if (! undo_touched)
{
/* we start an undo_group and immediately freeze undo saving
so that we can avoid sucking up tile cache with our unneeded
preview steps. */
gimp_image_undo_group_start (image_ID_global);
/* we freeze undo saving so that we can avoid sucking up
* tile cache with our unneeded preview steps. */
gimp_image_undo_freeze (image_ID_global);
undo_touched = TRUE;
......
......@@ -494,10 +494,8 @@ run (const gchar *name,
if (jsvals.preview)
{
/* we start an undo_group and immediately freeze undo saving
so that we can avoid sucking up tile cache with our unneeded
preview steps. */
gimp_image_undo_group_start (image_ID);
/* we freeze undo saving so that we can avoid sucking up
* tile cache with our unneeded preview steps. */
gimp_image_undo_freeze (image_ID);
undo_touched = TRUE;
......@@ -513,9 +511,10 @@ run (const gchar *name,
if (undo_touched)
{
/* thaw undo saving and end the undo_group. */
/* thaw undo saving and flush the displays to have them
* reflect the current shortcuts */
gimp_image_undo_thaw (image_ID);
gimp_image_undo_group_end (image_ID);
gimp_displays_flush ();
}
if (!err)
......@@ -1587,10 +1586,8 @@ make_preview (void)
{
if (! undo_touched)
{
/* we start an undo_group and immediately freeze undo saving
so that we can avoid sucking up tile cache with our unneeded
preview steps. */
gimp_image_undo_group_start (image_ID_global);
/* we freeze undo saving so that we can avoid sucking up
* tile cache with our unneeded preview steps. */
gimp_image_undo_freeze (image_ID_global);
undo_touched = TRUE;
......
......@@ -494,10 +494,8 @@ run (const gchar *name,
if (jsvals.preview)
{
/* we start an undo_group and immediately freeze undo saving
so that we can avoid sucking up tile cache with our unneeded
preview steps. */
gimp_image_undo_group_start (image_ID);
/* we freeze undo saving so that we can avoid sucking up
* tile cache with our unneeded preview steps. */
gimp_image_undo_freeze (image_ID);
undo_touched = TRUE;
......@@ -513,9 +511,10 @@ run (const gchar *name,
if (undo_touched)
{
/* thaw undo saving and end the undo_group. */
/* thaw undo saving and flush the displays to have them
* reflect the current shortcuts */
gimp_image_undo_thaw (image_ID);
gimp_image_undo_group_end (image_ID);
gimp_displays_flush ();
}
if (!err)
......@@ -1587,10 +1586,8 @@ make_preview (void)
{
if (! undo_touched)
{
/* we start an undo_group and immediately freeze undo saving
so that we can avoid sucking up tile cache with our unneeded
preview steps. */
gimp_image_undo_group_start (image_ID_global);
/* we freeze undo saving so that we can avoid sucking up
* tile cache with our unneeded preview steps. */
gimp_image_undo_freeze (image_ID_global);
undo_touched = TRUE;
......
......@@ -494,10 +494,8 @@ run (const gchar *name,
if (jsvals.preview)
{
/* we start an undo_group and immediately freeze undo saving
so that we can avoid sucking up tile cache with our unneeded
preview steps. */
gimp_image_undo_group_start (image_ID);
/* we freeze undo saving so that we can avoid sucking up
* tile cache with our unneeded preview steps. */
gimp_image_undo_freeze (image_ID);
undo_touched = TRUE;
......@@ -513,9 +511,10 @@ run (const gchar *name,
if (undo_touched)
{
/* thaw undo saving and end the undo_group. */
/* thaw undo saving and flush the displays to have them
* reflect the current shortcuts */
gimp_image_undo_thaw (image_ID);
gimp_image_undo_group_end (image_ID);
gimp_displays_flush ();
}
if (!err)
......@@ -1587,10 +1586,8 @@ make_preview (void)
{
if (! undo_touched)
{
/* we start an undo_group and immediately freeze undo saving
so that we can avoid sucking up tile cache with our unneeded
preview steps. */
gimp_image_undo_group_start (image_ID_global);
/* we freeze undo saving so that we can avoid sucking up
* tile cache with our unneeded preview steps. */
gimp_image_undo_freeze (image_ID_global);
undo_touched = TRUE;
......
......@@ -494,10 +494,8 @@ run (const gchar *name,
if (jsvals.preview)
{
/* we start an undo_group and immediately freeze undo saving
so that we can avoid sucking up tile cache with our unneeded
preview steps. */
gimp_image_undo_group_start (image_ID);
/* we freeze undo saving so that we can avoid sucking up
* tile cache with our unneeded preview steps. */
gimp_image_undo_freeze (image_ID);
undo_touched = TRUE;
......@@ -513,9 +511,10 @@ run (const gchar *name,
if (undo_touched)
{
/* thaw undo saving and end the undo_group. */
/* thaw undo saving and flush the displays to have them
* reflect the current shortcuts */
gimp_image_undo_thaw (image_ID);
gimp_image_undo_group_end (image_ID);
gimp_displays_flush ();
}
if (!err)
......@@ -1587,10 +1586,8 @@ make_preview (void)
{
if (! undo_touched)
{
/* we start an undo_group and immediately freeze undo saving
so that we can avoid sucking up tile cache with our unneeded
preview steps. */
gimp_image_undo_group_start (image_ID_global);
/* we freeze undo saving so that we can avoid sucking up
* tile cache with our unneeded preview steps. */
gimp_image_undo_freeze (image_ID_global);
undo_touched = TRUE;
......
......@@ -494,10 +494,8 @@ run (const gchar *name,
if (jsvals.preview)
{
/* we start an undo_group and immediately freeze undo saving
so that we can avoid sucking up tile cache with our unneeded
preview steps. */
gimp_image_undo_group_start (image_ID);
/* we freeze undo saving so that we can avoid sucking up
* tile cache with our unneeded preview steps. */
gimp_image_undo_freeze (image_ID);
undo_touched = TRUE;
......@@ -513,9 +511,10 @@ run (const gchar *name,
if (undo_touched)
{
/* thaw undo saving and end the undo_group. */
/* thaw undo saving and flush the displays to have them
* reflect the current shortcuts */
gimp_image_undo_thaw (image_ID);
gimp_image_undo_group_end (image_ID);
gimp_displays_flush ();
}
if (!err)
......@@ -1587,10 +1586,8 @@ make_preview (void)
{
if (! undo_touched)
{
/* we start an undo_group and immediately freeze undo saving
so that we can avoid sucking up tile cache with our unneeded
preview steps. */
gimp_image_undo_group_start (image_ID_global);
/* we freeze undo saving so that we can avoid sucking up
* tile cache with our unneeded preview steps. */
gimp_image_undo_freeze (image_ID_global);
undo_touched = TRUE;
......
......@@ -494,10 +494,8 @@ run (const gchar *name,
if (jsvals.preview)
{
/* we start an undo_group and immediately freeze undo saving
so that we can avoid sucking up tile cache with our unneeded
preview steps. */
gimp_image_undo_group_start (image_ID);
/* we freeze undo saving so that we can avoid sucking up
* tile cache with our unneeded preview steps. */
gimp_image_undo_freeze (image_ID);
undo_touched = TRUE;
......@@ -513,9 +511,10 @@ run (const gchar *name,
if (undo_touched)
{
/* thaw undo saving and end the undo_group. */
/* thaw undo saving and flush the displays to have them
* reflect the current shortcuts */
gimp_image_undo_thaw (image_ID);
gimp_image_undo_group_end (image_ID);
gimp_displays_flush ();
}
if (!err)
......@@ -1587,10 +1586,8 @@ make_preview (void)
{
if (! undo_touched)
{
/* we start an undo_group and immediately freeze undo saving
so that we can avoid sucking up tile cache with our unneeded
preview steps. */
gimp_image_undo_group_start (image_ID_global);
/* we freeze undo saving so that we can avoid sucking up
* tile cache with our unneeded preview steps. */
gimp_image_undo_freeze (image_ID_global);
undo_touched = TRUE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment