Commit b455d0c8 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

always flush the image when applying or discarding a layer mask. The

2003-03-22  Sven Neumann  <sven@gimp.org>

	* app/gui/layers-commands.c: always flush the image when applying
	or discarding a layer mask. The active drawable may change and
	make a menu update necessary (fixes bug #108958).

	* app/widgets/gimplayertreeview.c: call gimp_image_flush() when
	switching between layer and mask editing so the menus get updated.
parent d1c99bee
2003-03-22 Sven Neumann <sven@gimp.org>
* app/gui/layers-commands.c: always flush the image when applying
or discarding a layer mask. The active drawable may change and
make a menu update necessary (fixes bug #108958).
* app/widgets/gimplayertreeview.c: call gimp_image_flush() when
switching between layer and mask editing so the menus get updated.
2003-03-22 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainereditor.c: allow to create a
......@@ -343,14 +343,8 @@ layers_apply_layer_mask_cmd_callback (GtkWidget *widget,
if (gimp_layer_get_mask (active_layer))
{
gboolean flush;
flush = ! active_layer->mask->apply_mask || active_layer->mask->show_mask;
gimp_layer_apply_mask (active_layer, GIMP_MASK_APPLY, TRUE);
if (flush)
gimp_image_flush (gimage);
gimp_image_flush (gimage);
}
}
......@@ -364,14 +358,8 @@ layers_delete_layer_mask_cmd_callback (GtkWidget *widget,
if (gimp_layer_get_mask (active_layer))
{
gboolean flush;
flush = active_layer->mask->apply_mask || active_layer->mask->show_mask;
gimp_layer_apply_mask (active_layer, GIMP_MASK_DISCARD, TRUE);
if (flush)
gimp_image_flush (gimage);
gimp_image_flush (gimage);
}
}
......
......@@ -343,14 +343,8 @@ layers_apply_layer_mask_cmd_callback (GtkWidget *widget,
if (gimp_layer_get_mask (active_layer))
{
gboolean flush;
flush = ! active_layer->mask->apply_mask || active_layer->mask->show_mask;
gimp_layer_apply_mask (active_layer, GIMP_MASK_APPLY, TRUE);
if (flush)
gimp_image_flush (gimage);
gimp_image_flush (gimage);
}
}
......@@ -364,14 +358,8 @@ layers_delete_layer_mask_cmd_callback (GtkWidget *widget,
if (gimp_layer_get_mask (active_layer))
{
gboolean flush;
flush = active_layer->mask->apply_mask || active_layer->mask->show_mask;
gimp_layer_apply_mask (active_layer, GIMP_MASK_DISCARD, TRUE);
if (flush)
gimp_image_flush (gimage);
gimp_image_flush (gimage);
}
}
......
......@@ -1058,7 +1058,10 @@ gimp_layer_tree_view_layer_clicked (GimpCellRendererViewable *cell,
mask = GIMP_LAYER_MASK (renderer->viewable);
if (gimp_layer_mask_get_edit (mask))
gimp_layer_mask_set_edit (mask, FALSE);
{
gimp_layer_mask_set_edit (mask, FALSE);
gimp_image_flush (gimp_item_get_image (GIMP_ITEM (mask)));
}
g_object_unref (renderer);
}
......@@ -1103,10 +1106,10 @@ gimp_layer_tree_view_mask_clicked (GimpCellRendererViewable *cell,
gimp_layer_mask_set_apply (mask, ! gimp_layer_mask_get_apply (mask));
flush = TRUE;
}
else
else if (! gimp_layer_mask_get_edit (mask))
{
if (! gimp_layer_mask_get_edit (mask))
gimp_layer_mask_set_edit (mask, TRUE);
gimp_layer_mask_set_edit (mask, TRUE);
flush = TRUE;
}
if (flush)
......
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