Commit dade4a84 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/tools/gimpeditselectiontool.c compress undo steps only if the redo

2004-03-02  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpeditselectiontool.c
	* app/widgets/gimplayertreeview.c: compress undo steps only
	if the redo stack is empty.
parent f49a8c63
2004-03-02 Michael Natterer <mitch@gimp.org>
* app/tools/gimpeditselectiontool.c
* app/widgets/gimplayertreeview.c: compress undo steps only
if the redo stack is empty.
2004-03-02 Pedro Gimeno <pggimeno@wanadoo.es>
* plug-ins/common/bumpmap.c (bumpmap): Fix handling of positive Y
......@@ -1239,7 +1239,8 @@ gimp_edit_selection_tool_arrow_key (GimpTool *tool,
undo = gimp_undo_stack_peek (gdisp->gimage->undo_stack);
if (GIMP_IS_UNDO_STACK (undo) && undo->undo_type == undo_type)
if (! gimp_undo_stack_peek (gdisp->gimage->redo_stack) &&
GIMP_IS_UNDO_STACK (undo) && undo->undo_type == undo_type)
{
if (g_object_get_data (G_OBJECT (undo), "edit-selection-tool") ==
(gpointer) tool &&
......
......@@ -803,9 +803,7 @@ gimp_layer_tree_view_paint_mode_menu_callback (GtkWidget *widget,
if (layer)
{
GimpLayerModeEffects mode;
mode = (GimpLayerModeEffects)
GimpLayerModeEffects mode =
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget),
"gimp-item-data"));
......@@ -817,8 +815,9 @@ gimp_layer_tree_view_paint_mode_menu_callback (GtkWidget *widget,
undo = gimp_undo_stack_peek (gimage->undo_stack);
/* compress layer mode undos */
if (GIMP_IS_ITEM_UNDO (undo) &&
undo->undo_type == GIMP_UNDO_LAYER_MODE &&
if (! gimp_undo_stack_peek (gimage->redo_stack) &&
GIMP_IS_ITEM_UNDO (undo) &&
undo->undo_type == GIMP_UNDO_LAYER_MODE &&
GIMP_ITEM_UNDO (undo)->item == GIMP_ITEM (layer))
push_undo = FALSE;
......@@ -872,9 +871,7 @@ gimp_layer_tree_view_opacity_scale_changed (GtkAdjustment *adjustment,
if (layer)
{
gdouble opacity;
opacity = adjustment->value / 100.0;
gdouble opacity = adjustment->value / 100.0;
if (gimp_layer_get_opacity (layer) != opacity)
{
......@@ -884,8 +881,9 @@ gimp_layer_tree_view_opacity_scale_changed (GtkAdjustment *adjustment,
undo = gimp_undo_stack_peek (gimage->undo_stack);
/* compress opacity undos */
if (GIMP_IS_ITEM_UNDO (undo) &&
undo->undo_type == GIMP_UNDO_LAYER_OPACITY &&
if (! gimp_undo_stack_peek (gimage->redo_stack) &&
GIMP_IS_ITEM_UNDO (undo) &&
undo->undo_type == GIMP_UNDO_LAYER_OPACITY &&
GIMP_ITEM_UNDO (undo)->item == GIMP_ITEM (layer))
push_undo = FALSE;
......
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