mirror of https://github.com/GNOME/gimp.git
compress emissions of "mask_changed" and "qmask_changed" across undo
2002-08-22 Michael Natterer <mitch@gimp.org> * app/undo.c: compress emissions of "mask_changed" and "qmask_changed" across undo groups. * app/core/gimpimage-mask.c: set GIMP_DRAWABLE(mask)->preview_valid to FALSE in gimp_image_mask_invalidate(), not in gimp_image_mask_push_undo(). Fixes selection preview rendering after a mask undo.
This commit is contained in:
parent
b5e38ad1d7
commit
c2523d8d63
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2002-08-22 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
* app/undo.c: compress emissions of "mask_changed" and
|
||||||
|
"qmask_changed" across undo groups.
|
||||||
|
|
||||||
|
* app/core/gimpimage-mask.c: set GIMP_DRAWABLE(mask)->preview_valid
|
||||||
|
to FALSE in gimp_image_mask_invalidate(), not in
|
||||||
|
gimp_image_mask_push_undo(). Fixes selection preview rendering
|
||||||
|
after a mask undo.
|
||||||
|
|
||||||
2002-08-22 Michael Natterer <mitch@gimp.org>
|
2002-08-22 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* app/display/gimpdisplayshell-render.c: allocate all temporary
|
* app/display/gimpdisplayshell-render.c: allocate all temporary
|
||||||
|
|
|
@ -164,6 +164,9 @@ gimp_image_mask_invalidate (GimpImage *gimage)
|
||||||
0, 0,
|
0, 0,
|
||||||
GIMP_DRAWABLE (layer)->width,
|
GIMP_DRAWABLE (layer)->width,
|
||||||
GIMP_DRAWABLE (layer)->height);
|
GIMP_DRAWABLE (layer)->height);
|
||||||
|
|
||||||
|
/* invalidate the preview */
|
||||||
|
GIMP_DRAWABLE (mask)->preview_valid = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -417,9 +420,6 @@ gimp_image_mask_push_undo (GimpImage *gimage)
|
||||||
undo_push_mask (gimage, mask);
|
undo_push_mask (gimage, mask);
|
||||||
|
|
||||||
gimp_image_mask_invalidate (gimage);
|
gimp_image_mask_invalidate (gimage);
|
||||||
|
|
||||||
/* invalidate the preview */
|
|
||||||
GIMP_DRAWABLE (mask)->preview_valid = FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -113,6 +113,8 @@ static gboolean mode_changed = FALSE;
|
||||||
static gboolean size_changed = FALSE;
|
static gboolean size_changed = FALSE;
|
||||||
static gboolean resolution_changed = FALSE;
|
static gboolean resolution_changed = FALSE;
|
||||||
static gboolean unit_changed = FALSE;
|
static gboolean unit_changed = FALSE;
|
||||||
|
static gboolean mask_changed = FALSE;
|
||||||
|
static gboolean qmask_changed = FALSE;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -388,6 +390,22 @@ pop_stack (GimpImage *gimage,
|
||||||
unit_changed = FALSE;
|
unit_changed = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If the mask_changed flag was set */
|
||||||
|
if (mask_changed)
|
||||||
|
{
|
||||||
|
gimp_image_mask_changed (gimage);
|
||||||
|
|
||||||
|
mask_changed = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If the qmask_changed flag was set */
|
||||||
|
if (qmask_changed)
|
||||||
|
{
|
||||||
|
gimp_image_qmask_changed (gimage);
|
||||||
|
|
||||||
|
qmask_changed = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* let others know that we just popped an action */
|
/* let others know that we just popped an action */
|
||||||
gimp_image_undo_event (gimage,
|
gimp_image_undo_event (gimage,
|
||||||
(state == UNDO)? UNDO_POPPED : UNDO_REDO);
|
(state == UNDO)? UNDO_POPPED : UNDO_REDO);
|
||||||
|
@ -1195,7 +1213,7 @@ undo_pop_image_qmask (GimpImage *gimage,
|
||||||
gimage->qmask_state = data->qmask;
|
gimage->qmask_state = data->qmask;
|
||||||
data->qmask = tmp;
|
data->qmask = tmp;
|
||||||
|
|
||||||
gimp_image_qmask_changed (gimage);
|
qmask_changed = TRUE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1427,6 +1445,7 @@ undo_pop_mask (GimpImage *gimage,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mask_undo->channel->boundary_known = FALSE;
|
mask_undo->channel->boundary_known = FALSE;
|
||||||
|
GIMP_DRAWABLE (mask_undo->channel)->preview_valid = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mask_undo->tiles)
|
if (mask_undo->tiles)
|
||||||
|
@ -1456,7 +1475,7 @@ undo_pop_mask (GimpImage *gimage,
|
||||||
|
|
||||||
if (mask_undo->channel == gimp_image_get_mask (gimage))
|
if (mask_undo->channel == gimp_image_get_mask (gimage))
|
||||||
{
|
{
|
||||||
gimp_image_mask_changed (gimage);
|
mask_changed = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
23
app/undo.c
23
app/undo.c
|
@ -113,6 +113,8 @@ static gboolean mode_changed = FALSE;
|
||||||
static gboolean size_changed = FALSE;
|
static gboolean size_changed = FALSE;
|
||||||
static gboolean resolution_changed = FALSE;
|
static gboolean resolution_changed = FALSE;
|
||||||
static gboolean unit_changed = FALSE;
|
static gboolean unit_changed = FALSE;
|
||||||
|
static gboolean mask_changed = FALSE;
|
||||||
|
static gboolean qmask_changed = FALSE;
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -388,6 +390,22 @@ pop_stack (GimpImage *gimage,
|
||||||
unit_changed = FALSE;
|
unit_changed = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If the mask_changed flag was set */
|
||||||
|
if (mask_changed)
|
||||||
|
{
|
||||||
|
gimp_image_mask_changed (gimage);
|
||||||
|
|
||||||
|
mask_changed = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If the qmask_changed flag was set */
|
||||||
|
if (qmask_changed)
|
||||||
|
{
|
||||||
|
gimp_image_qmask_changed (gimage);
|
||||||
|
|
||||||
|
qmask_changed = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* let others know that we just popped an action */
|
/* let others know that we just popped an action */
|
||||||
gimp_image_undo_event (gimage,
|
gimp_image_undo_event (gimage,
|
||||||
(state == UNDO)? UNDO_POPPED : UNDO_REDO);
|
(state == UNDO)? UNDO_POPPED : UNDO_REDO);
|
||||||
|
@ -1195,7 +1213,7 @@ undo_pop_image_qmask (GimpImage *gimage,
|
||||||
gimage->qmask_state = data->qmask;
|
gimage->qmask_state = data->qmask;
|
||||||
data->qmask = tmp;
|
data->qmask = tmp;
|
||||||
|
|
||||||
gimp_image_qmask_changed (gimage);
|
qmask_changed = TRUE;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1427,6 +1445,7 @@ undo_pop_mask (GimpImage *gimage,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mask_undo->channel->boundary_known = FALSE;
|
mask_undo->channel->boundary_known = FALSE;
|
||||||
|
GIMP_DRAWABLE (mask_undo->channel)->preview_valid = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mask_undo->tiles)
|
if (mask_undo->tiles)
|
||||||
|
@ -1456,7 +1475,7 @@ undo_pop_mask (GimpImage *gimage,
|
||||||
|
|
||||||
if (mask_undo->channel == gimp_image_get_mask (gimage))
|
if (mask_undo->channel == gimp_image_get_mask (gimage))
|
||||||
{
|
{
|
||||||
gimp_image_mask_changed (gimage);
|
mask_changed = TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue