Commit 11409e97 authored by Austin Donnelly's avatar Austin Donnelly Committed by Austin Donnelly
Browse files

comment typo fix, plus add %D* to default image-title-format string, so

Fri Oct  1 12:46:12 1999  Austin Donnelly  <austin@gimp.org>

	* gimprc.in: comment typo fix, plus add %D* to default
	    image-title-format string, so people get a '*' in the titlebar
	    if their image is dirty.
	* app/fileops.c: initialise filename before using it.
	* app/gdisplay.c: empty parameter list () is K&R - should be
	    stronger (void) in ANSI C.
	* app/gimpdrawable.c: gimp_drawable_{dirty,clean} functions
	    removed - no one uses them anyway.  Parasite undo type is
	    proper parasite undo type, not MISC_UNDO.
	* app/gimpdrawableP.h: drawable dirty bit removed.
	* app/gimpimage.c: don't change the resolution if there's no
	    difference from the old one.  Call gdisplay_shrink_wrap() to
	    re-calculate scale factors and refresh the display on
	    resolution change.  Layer undo doesn't have sub-types
	    anymore, uses main UndoType instead.
	* app/layer.h: Remove LayerUndoType
	* app/qmask.c: fix qmask undo so it actually works.
	* app/undo.h: new types for undo_push_layer{,_mask} and
	    undo_push_qmask.
	* app/undo.c: change way group boundaries are represented:
	    each Undo has a group_boundary boolean set to TRUE if this is
	    the start or the end of a group, and the type of the Undo is
	    the group's type.  Within a group, each Undo keeps its own
	    type.  This allows pop funcs and free funcs to do
	    type-specific things (eg needed by layer and channel stuff).
	    Don't maintain per-drawable dirty flags anymore.   Floating
	    sel to layer and layer rename now uses meaningful undo types.
	* app/undo_types.h: more specific undo types:
	    LAYER_{ADD,REMOVE}_UNDO, LAYER_MASK_{ADD,REMOVE}_UNDO,
	    LAYER_RENAME_UNDO, and PARASITE_{ATTACH,DETACH}_UNDO.
	* app/undo_history.c: oops - undo stack was being placed into gtk
	    list in wrong order.
	* app/edit_selection.c: push more descriptive LAYER_DISPLACE_UNDO
	    rather than MISC_UNDO.
	* app/layers_dialog.c: better tagging of undo types
parent cdf43f81
Fri Oct 1 12:46:12 1999 Austin Donnelly <austin@gimp.org>
* gimprc.in: comment typo fix, plus add %D* to default
image-title-format string, so people get a '*' in the titlebar
if their image is dirty.
* app/fileops.c: initialise filename before using it.
* app/gdisplay.c: empty parameter list () is K&R - should be
stronger (void) in ANSI C.
* app/gimpdrawable.c: gimp_drawable_{dirty,clean} functions
removed - no one uses them anyway. Parasite undo type is
proper parasite undo type, not MISC_UNDO.
* app/gimpdrawableP.h: drawable dirty bit removed.
* app/gimpimage.c: don't change the resolution if there's no
difference from the old one. Call gdisplay_shrink_wrap() to
re-calculate scale factors and refresh the display on
resolution change. Layer undo doesn't have sub-types
anymore, uses main UndoType instead.
* app/layer.h: Remove LayerUndoType
* app/qmask.c: fix qmask undo so it actually works.
* app/undo.h: new types for undo_push_layer{,_mask} and
undo_push_qmask.
* app/undo.c: change way group boundaries are represented:
each Undo has a group_boundary boolean set to TRUE if this is
the start or the end of a group, and the type of the Undo is
the group's type. Within a group, each Undo keeps its own
type. This allows pop funcs and free funcs to do
type-specific things (eg needed by layer and channel stuff).
Don't maintain per-drawable dirty flags anymore. Floating
sel to layer and layer rename now uses meaningful undo types.
* app/undo_types.h: more specific undo types:
LAYER_{ADD,REMOVE}_UNDO, LAYER_MASK_{ADD,REMOVE}_UNDO,
LAYER_RENAME_UNDO, and PARASITE_{ATTACH,DETACH}_UNDO.
* app/undo_history.c: oops - undo stack was being placed into gtk
list in wrong order.
* app/edit_selection.c: push more descriptive LAYER_DISPLACE_UNDO
rather than MISC_UNDO.
* app/layers_dialog.c: better tagging of undo types
Fri Oct 1 17:14:51 1999 ape@gandalf.spacetec.no (Asbjorn Pettersen)
* app/unittest/parse_gimprc.c: Add parameters options.
......
......@@ -140,15 +140,17 @@ qmask_deactivate (GtkWidget *w,
if ( (gmask = gimp_image_get_channel_by_name (gimg, "Qmask")) )
{
gimage_mask_load (gimg, gmask);
gimage_remove_channel(gimg, gmask);
undo_push_qmask(gimg,1);
gimage_remove_channel (gimg, gmask);
undo_push_qmask (gimg);
gdisp->gimage->qmask_state = 0;
gdisplays_flush ();
}
else
gdisp->gimage->qmask_state = 0;
undo_push_group_end (gimg);
if (gmask)
gdisplays_flush ();
}
}
......@@ -198,9 +200,8 @@ qmask_activate (GtkWidget *w,
gimp_image_add_channel (gimg, gmask, 0);
gimp_drawable_fill (GIMP_DRAWABLE(gmask), 0, 0, 0, 0);
/* edit_clear(gimg,GIMP_DRAWABLE(gmask)); */
undo_push_qmask(gimg,0);
undo_push_qmask (gimg);
gdisp->gimage->qmask_state = 1;
gdisplays_flush();
}
else
{ /* if selection */
......@@ -210,11 +211,11 @@ qmask_activate (GtkWidget *w,
channel_set_name(gmask, "Qmask");
channel_set_opacity(gmask, opacity);
gimage_mask_none (gimg); /* Clear the selection */
undo_push_qmask(gimg,0);
undo_push_qmask (gimg);
gdisp->gimage->qmask_state = 1;
gdisplays_flush();
}
undo_push_group_end(gimg);
gdisplays_flush();
}
}
......
......@@ -140,15 +140,17 @@ qmask_deactivate (GtkWidget *w,
if ( (gmask = gimp_image_get_channel_by_name (gimg, "Qmask")) )
{
gimage_mask_load (gimg, gmask);
gimage_remove_channel(gimg, gmask);
undo_push_qmask(gimg,1);
gimage_remove_channel (gimg, gmask);
undo_push_qmask (gimg);
gdisp->gimage->qmask_state = 0;
gdisplays_flush ();
}
else
gdisp->gimage->qmask_state = 0;
undo_push_group_end (gimg);
if (gmask)
gdisplays_flush ();
}
}
......@@ -198,9 +200,8 @@ qmask_activate (GtkWidget *w,
gimp_image_add_channel (gimg, gmask, 0);
gimp_drawable_fill (GIMP_DRAWABLE(gmask), 0, 0, 0, 0);
/* edit_clear(gimg,GIMP_DRAWABLE(gmask)); */
undo_push_qmask(gimg,0);
undo_push_qmask (gimg);
gdisp->gimage->qmask_state = 1;
gdisplays_flush();
}
else
{ /* if selection */
......@@ -210,11 +211,11 @@ qmask_activate (GtkWidget *w,
channel_set_name(gmask, "Qmask");
channel_set_opacity(gmask, opacity);
gimage_mask_none (gimg); /* Clear the selection */
undo_push_qmask(gimg,0);
undo_push_qmask (gimg);
gdisp->gimage->qmask_state = 1;
gdisplays_flush();
}
undo_push_group_end(gimg);
gdisplays_flush();
}
}
......
......@@ -233,23 +233,6 @@ gimp_drawable_invalidate_preview (GimpDrawable *drawable)
}
}
gint
gimp_drawable_dirty (GimpDrawable *drawable)
{
if (drawable)
return drawable->dirty = (drawable->dirty < 0) ? 2 : drawable->dirty + 1;
else
return 0;
}
gint
gimp_drawable_clean (GimpDrawable *drawable)
{
if (drawable)
return drawable->dirty = (drawable->dirty <= 0) ? 0 : drawable->dirty - 1;
else
return 0;
}
GimpImage *
gimp_drawable_gimage (GimpDrawable *drawable)
......@@ -485,8 +468,9 @@ gimp_drawable_attach_parasite (GimpDrawable *drawable,
parasite differs from the current one and we arn't undoable */
if (parasite_is_undoable (parasite))
{
undo_push_group_start (drawable->gimage, MISC_UNDO); /* do a group in case we have
attach_parrent set */
/* do a group in case we have attach_parent set */
undo_push_group_start (drawable->gimage, PARASITE_ATTACH_UNDO);
undo_push_drawable_parasite (drawable->gimage, drawable, parasite);
}
else if (parasite_is_persistent(parasite) &&
......@@ -661,7 +645,6 @@ gimp_drawable_init (GimpDrawable *drawable)
drawable->offset_x = 0;
drawable->offset_y = 0;
drawable->bytes = 0;
drawable->dirty = FALSE;
drawable->gimage = NULL;
drawable->type = -1;
drawable->has_alpha = FALSE;
......@@ -752,7 +735,6 @@ gimp_drawable_configure (GimpDrawable *drawable,
if (drawable->tiles)
tile_manager_destroy (drawable->tiles);
drawable->tiles = tile_manager_new (width, height, bpp);
drawable->dirty = FALSE;
drawable->visible = TRUE;
if (gimage)
......
......@@ -41,6 +41,13 @@
#include "drawable_pvt.h" /* ick ick. */
#ifdef DEBUG
#define TRC(x) printf x
#else
#define TRC(x)
#endif
/* Local function declarations */
static void gimp_image_free_projection (GimpImage *);
static void gimp_image_allocate_shadow (GimpImage *, gint, gint, gint);
......@@ -343,10 +350,18 @@ gimp_image_set_resolution (GimpImage *gimage,
gdouble xresolution,
gdouble yresolution)
{
/* nothing to do if setting res to the same as before */
if ((ABS (gimage->xresolution - xresolution) < 1e-5) &&
(ABS (gimage->yresolution - yresolution) < 1e-5))
return;
undo_push_resolution (gimage);
gimage->xresolution = xresolution;
gimage->yresolution = yresolution;
/* really just want to recalc size and repaint */
gdisplays_shrink_wrap (gimage);
}
void
......@@ -2839,8 +2854,7 @@ gimp_image_add_layer (GimpImage *gimage,
lu->layer = float_layer;
lu->prev_position = 0;
lu->prev_layer = gimage->active_layer;
lu->undo_type = 0;
undo_push_layer (gimage, lu);
undo_push_layer (gimage, LAYER_ADD_UNDO, lu);
/* If the layer is a floating selection, set the ID */
if (layer_is_floating_sel (float_layer))
......@@ -2906,7 +2920,6 @@ gimp_image_remove_layer (GimpImage *gimage,
lu->layer = layer;
lu->prev_position = gimp_image_get_layer_index (gimage, layer);
lu->prev_layer = layer;
lu->undo_type = 1;
gimage->layers = g_slist_remove (gimage->layers, layer);
gimage->layer_stack = g_slist_remove (gimage->layer_stack, layer);
......@@ -2939,7 +2952,7 @@ gimp_image_remove_layer (GimpImage *gimage,
/* Push the layer undo--It is important it goes here since layer might
* be immediately destroyed if the undo push fails
*/
undo_push_layer (gimage, lu);
undo_push_layer (gimage, LAYER_REMOVE_UNDO, lu);
/* invalidate the composite preview */
gimp_image_invalidate_preview (gimage);
......@@ -2984,11 +2997,10 @@ gimp_image_add_layer_mask (GimpImage *gimage,
lmu = g_new (LayerMaskUndo, 1);
lmu->layer = layer;
lmu->mask = mask;
lmu->undo_type = 0;
lmu->apply_mask = layer->apply_mask;
lmu->edit_mask = layer->edit_mask;
lmu->show_mask = layer->show_mask;
undo_push_layer_mask (gimage, lmu);
undo_push_layer_mask (gimage, LAYER_MASK_ADD_UNDO, lmu);
return mask;
}
......@@ -3011,7 +3023,6 @@ gimp_image_remove_layer_mask (GimpImage *gimage,
lmu = g_new (LayerMaskUndo, 1);
lmu->layer = layer;
lmu->mask = layer->mask;
lmu->undo_type = 1;
lmu->mode = mode;
lmu->apply_mask = layer->apply_mask;
lmu->edit_mask = layer->edit_mask;
......@@ -3023,7 +3034,7 @@ gimp_image_remove_layer_mask (GimpImage *gimage,
* to layer_apply_mask, in case the undo push fails and the
* mask is delete : NULL)d
*/
undo_push_layer_mask (gimage, lmu);
undo_push_layer_mask (gimage, LAYER_MASK_REMOVE_UNDO, lmu);
/* end the undo group */
undo_push_group_end (gimage);
......@@ -3410,6 +3421,8 @@ gimp_image_dirty (GimpImage *gimage)
gimage->dirty++;
gtk_signal_emit(GTK_OBJECT(gimage), gimp_image_signals[DIRTY]);
TRC (("dirty %d -> %d\n", gimage->dirty-1, gimage->dirty));
return gimage->dirty;
}
......@@ -3419,6 +3432,8 @@ gimp_image_clean (GimpImage *gimage)
gimage->dirty--;
gtk_signal_emit(GTK_OBJECT(gimage), gimp_image_signals[CLEAN]);
TRC (("clean %d -> %d\n", gimage->dirty+1, gimage->dirty));
return gimage->dirty;
}
......
......@@ -41,6 +41,13 @@
#include "drawable_pvt.h" /* ick ick. */
#ifdef DEBUG
#define TRC(x) printf x
#else
#define TRC(x)
#endif
/* Local function declarations */
static void gimp_image_free_projection (GimpImage *);
static void gimp_image_allocate_shadow (GimpImage *, gint, gint, gint);
......@@ -343,10 +350,18 @@ gimp_image_set_resolution (GimpImage *gimage,
gdouble xresolution,
gdouble yresolution)
{
/* nothing to do if setting res to the same as before */
if ((ABS (gimage->xresolution - xresolution) < 1e-5) &&
(ABS (gimage->yresolution - yresolution) < 1e-5))
return;
undo_push_resolution (gimage);
gimage->xresolution = xresolution;
gimage->yresolution = yresolution;
/* really just want to recalc size and repaint */
gdisplays_shrink_wrap (gimage);
}
void
......@@ -2839,8 +2854,7 @@ gimp_image_add_layer (GimpImage *gimage,
lu->layer = float_layer;
lu->prev_position = 0;
lu->prev_layer = gimage->active_layer;
lu->undo_type = 0;
undo_push_layer (gimage, lu);
undo_push_layer (gimage, LAYER_ADD_UNDO, lu);
/* If the layer is a floating selection, set the ID */
if (layer_is_floating_sel (float_layer))
......@@ -2906,7 +2920,6 @@ gimp_image_remove_layer (GimpImage *gimage,
lu->layer = layer;
lu->prev_position = gimp_image_get_layer_index (gimage, layer);
lu->prev_layer = layer;
lu->undo_type = 1;
gimage->layers = g_slist_remove (gimage->layers, layer);
gimage->layer_stack = g_slist_remove (gimage->layer_stack, layer);
......@@ -2939,7 +2952,7 @@ gimp_image_remove_layer (GimpImage *gimage,
/* Push the layer undo--It is important it goes here since layer might
* be immediately destroyed if the undo push fails
*/
undo_push_layer (gimage, lu);
undo_push_layer (gimage, LAYER_REMOVE_UNDO, lu);
/* invalidate the composite preview */
gimp_image_invalidate_preview (gimage);
......@@ -2984,11 +2997,10 @@ gimp_image_add_layer_mask (GimpImage *gimage,
lmu = g_new (LayerMaskUndo, 1);
lmu->layer = layer;
lmu->mask = mask;
lmu->undo_type = 0;
lmu->apply_mask = layer->apply_mask;
lmu->edit_mask = layer->edit_mask;
lmu->show_mask = layer->show_mask;
undo_push_layer_mask (gimage, lmu);
undo_push_layer_mask (gimage, LAYER_MASK_ADD_UNDO, lmu);
return mask;
}
......@@ -3011,7 +3023,6 @@ gimp_image_remove_layer_mask (GimpImage *gimage,
lmu = g_new (LayerMaskUndo, 1);
lmu->layer = layer;
lmu->mask = layer->mask;
lmu->undo_type = 1;
lmu->mode = mode;
lmu->apply_mask = layer->apply_mask;
lmu->edit_mask = layer->edit_mask;
......@@ -3023,7 +3034,7 @@ gimp_image_remove_layer_mask (GimpImage *gimage,
* to layer_apply_mask, in case the undo push fails and the
* mask is delete : NULL)d
*/
undo_push_layer_mask (gimage, lmu);
undo_push_layer_mask (gimage, LAYER_MASK_REMOVE_UNDO, lmu);
/* end the undo group */
undo_push_group_end (gimage);
......@@ -3410,6 +3421,8 @@ gimp_image_dirty (GimpImage *gimage)
gimage->dirty++;
gtk_signal_emit(GTK_OBJECT(gimage), gimp_image_signals[DIRTY]);
TRC (("dirty %d -> %d\n", gimage->dirty-1, gimage->dirty));
return gimage->dirty;
}
......@@ -3419,6 +3432,8 @@ gimp_image_clean (GimpImage *gimage)
gimage->dirty--;
gtk_signal_emit(GTK_OBJECT(gimage), gimp_image_signals[CLEAN]);
TRC (("clean %d -> %d\n", gimage->dirty+1, gimage->dirty));
return gimage->dirty;
}
......
......@@ -41,6 +41,13 @@
#include "drawable_pvt.h" /* ick ick. */
#ifdef DEBUG
#define TRC(x) printf x
#else
#define TRC(x)
#endif
/* Local function declarations */
static void gimp_image_free_projection (GimpImage *);
static void gimp_image_allocate_shadow (GimpImage *, gint, gint, gint);
......@@ -343,10 +350,18 @@ gimp_image_set_resolution (GimpImage *gimage,
gdouble xresolution,
gdouble yresolution)
{
/* nothing to do if setting res to the same as before */
if ((ABS (gimage->xresolution - xresolution) < 1e-5) &&
(ABS (gimage->yresolution - yresolution) < 1e-5))
return;
undo_push_resolution (gimage);
gimage->xresolution = xresolution;
gimage->yresolution = yresolution;
/* really just want to recalc size and repaint */
gdisplays_shrink_wrap (gimage);
}
void
......@@ -2839,8 +2854,7 @@ gimp_image_add_layer (GimpImage *gimage,
lu->layer = float_layer;
lu->prev_position = 0;
lu->prev_layer = gimage->active_layer;
lu->undo_type = 0;
undo_push_layer (gimage, lu);
undo_push_layer (gimage, LAYER_ADD_UNDO, lu);
/* If the layer is a floating selection, set the ID */
if (layer_is_floating_sel (float_layer))
......@@ -2906,7 +2920,6 @@ gimp_image_remove_layer (GimpImage *gimage,
lu->layer = layer;
lu->prev_position = gimp_image_get_layer_index (gimage, layer);
lu->prev_layer = layer;
lu->undo_type = 1;
gimage->layers = g_slist_remove (gimage->layers, layer);
gimage->layer_stack = g_slist_remove (gimage->layer_stack, layer);
......@@ -2939,7 +2952,7 @@ gimp_image_remove_layer (GimpImage *gimage,
/* Push the layer undo--It is important it goes here since layer might
* be immediately destroyed if the undo push fails
*/
undo_push_layer (gimage, lu);
undo_push_layer (gimage, LAYER_REMOVE_UNDO, lu);
/* invalidate the composite preview */
gimp_image_invalidate_preview (gimage);
......@@ -2984,11 +2997,10 @@ gimp_image_add_layer_mask (GimpImage *gimage,
lmu = g_new (LayerMaskUndo, 1);
lmu->layer = layer;
lmu->mask = mask;
lmu->undo_type = 0;
lmu->apply_mask = layer->apply_mask;
lmu->edit_mask = layer->edit_mask;
lmu->show_mask = layer->show_mask;
undo_push_layer_mask (gimage, lmu);
undo_push_layer_mask (gimage, LAYER_MASK_ADD_UNDO, lmu);
return mask;
}
......@@ -3011,7 +3023,6 @@ gimp_image_remove_layer_mask (GimpImage *gimage,
lmu = g_new (LayerMaskUndo, 1);
lmu->layer = layer;
lmu->mask = layer->mask;
lmu->undo_type = 1;
lmu->mode = mode;
lmu->apply_mask = layer->apply_mask;
lmu->edit_mask = layer->edit_mask;
......@@ -3023,7 +3034,7 @@ gimp_image_remove_layer_mask (GimpImage *gimage,
* to layer_apply_mask, in case the undo push fails and the
* mask is delete : NULL)d
*/
undo_push_layer_mask (gimage, lmu);
undo_push_layer_mask (gimage, LAYER_MASK_REMOVE_UNDO, lmu);
/* end the undo group */
undo_push_group_end (gimage);
......@@ -3410,6 +3421,8 @@ gimp_image_dirty (GimpImage *gimage)
gimage->dirty++;
gtk_signal_emit(GTK_OBJECT(gimage), gimp_image_signals[DIRTY]);
TRC (("dirty %d -> %d\n", gimage->dirty-1, gimage->dirty));
return gimage->dirty;
}
......@@ -3419,6 +3432,8 @@ gimp_image_clean (GimpImage *gimage)
gimage->dirty--;
gtk_signal_emit(GTK_OBJECT(gimage), gimp_image_signals[CLEAN]);
TRC (("clean %d -> %d\n", gimage->dirty+1, gimage->dirty));
return gimage->dirty;
}
......
......@@ -140,15 +140,17 @@ qmask_deactivate (GtkWidget *w,
if ( (gmask = gimp_image_get_channel_by_name (gimg, "Qmask")) )
{
gimage_mask_load (gimg, gmask);
gimage_remove_channel(gimg, gmask);
undo_push_qmask(gimg,1);
gimage_remove_channel (gimg, gmask);
undo_push_qmask (gimg);
gdisp->gimage->qmask_state = 0;
gdisplays_flush ();
}
else
gdisp->gimage->qmask_state = 0;
undo_push_group_end (gimg);
if (gmask)
gdisplays_flush ();
}
}
......@@ -198,9 +200,8 @@ qmask_activate (GtkWidget *w,
gimp_image_add_channel (gimg, gmask, 0);
gimp_drawable_fill (GIMP_DRAWABLE(gmask), 0, 0, 0, 0);
/* edit_clear(gimg,GIMP_DRAWABLE(gmask)); */
undo_push_qmask(gimg,0);
undo_push_qmask (gimg);
gdisp->gimage->qmask_state = 1;
gdisplays_flush();
}
else
{ /* if selection */
......@@ -210,11 +211,11 @@ qmask_activate (GtkWidget *w,
channel_set_name(gmask, "Qmask");
channel_set_opacity(gmask, opacity);
gimage_mask_none (gimg); /* Clear the selection */
undo_push_qmask(gimg,0);
undo_push_qmask (gimg);
gdisp->gimage->qmask_state = 1;
gdisplays_flush();
}
undo_push_group_end(gimg);
gdisplays_flush();
}
}
......
......@@ -140,15 +140,17 @@ qmask_deactivate (GtkWidget *w,
if ( (gmask = gimp_image_get_channel_by_name (gimg, "Qmask")) )
{
gimage_mask_load (gimg, gmask);
gimage_remove_channel(gimg, gmask);
undo_push_qmask(gimg,1);
gimage_remove_channel (gimg, gmask);
undo_push_qmask (gimg);
gdisp->gimage->qmask_state = 0;
gdisplays_flush ();
}
else
gdisp->gimage->qmask_state = 0;
undo_push_group_end (gimg);
if (gmask)
gdisplays_flush ();
}
}
......@@ -198,9 +200,8 @@ qmask_activate (GtkWidget *w,
gimp_image_add_channel (gimg, gmask, 0);
gimp_drawable_fill (GIMP_DRAWABLE(gmask), 0, 0, 0, 0);
/* edit_clear(gimg,GIMP_DRAWABLE(gmask)); */
undo_push_qmask(gimg,0);
undo_push_qmask (gimg);
gdisp->gimage->qmask_state = 1;
gdisplays_flush();
}
else
{ /* if selection */
......@@ -210,11 +211,11 @@ qmask_activate (GtkWidget *w,
channel_set_name(gmask, "Qmask");
channel_set_opacity(gmask, opacity);
gimage_mask_none (gimg); /* Clear the selection */
undo_push_qmask(gimg,0);
undo_push_qmask (gimg);
gdisp->gimage->qmask_state = 1;
gdisplays_flush();
}
undo_push_group_end(gimg);
gdisplays_flush();
}
}
......
......@@ -41,6 +41,13 @@
#include "drawable_pvt.h" /* ick ick. */
#ifdef DEBUG
#define TRC(x) printf x
#else
#define TRC(x)
#endif
/* Local function declarations */
static void gimp_image_free_projection (GimpImage *);
static void gimp_image_allocate_shadow (GimpImage *, gint, gint, gint);
......@@ -343,10 +350,18 @@ gimp_image_set_resolution (GimpImage *gimage,
gdouble xresolution,
gdouble yresolution)
{
/* nothing to do if setting res to the same as before */
if ((ABS (gimage->xresolution - xresolution) < 1e-5) &&