mirror of https://github.com/GNOME/gimp.git
Several fixes, most notably a bug in undo when drawing outside an image,
and the "out of paint bug".
This commit is contained in:
parent
b79b45400e
commit
05c73c4146
|
@ -334,8 +334,10 @@ channels_dialog_update (int gimage_id)
|
|||
|
||||
channelsD->gimage_id = gimage_id;
|
||||
|
||||
suspend_gimage_notify++;
|
||||
/* Free all elements in the channels listbox */
|
||||
gtk_list_clear_items (GTK_LIST (channelsD->channel_list), 0, -1);
|
||||
suspend_gimage_notify--;
|
||||
|
||||
list = channelsD->channel_widgets;
|
||||
while (list)
|
||||
|
@ -419,7 +421,9 @@ channels_dialog_update (int gimage_id)
|
|||
void
|
||||
channels_dialog_clear ()
|
||||
{
|
||||
suspend_gimage_notify++;
|
||||
gtk_list_clear_items (GTK_LIST (channelsD->channel_list), 0, -1);
|
||||
suspend_gimage_notify--;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -431,8 +435,10 @@ channels_dialog_free ()
|
|||
if (channelsD == NULL)
|
||||
return;
|
||||
|
||||
suspend_gimage_notify++;
|
||||
/* Free all elements in the channels listbox */
|
||||
gtk_list_clear_items (GTK_LIST (channelsD->channel_list), 0, -1);
|
||||
suspend_gimage_notify--;
|
||||
|
||||
list = channelsD->channel_widgets;
|
||||
while (list)
|
||||
|
|
|
@ -433,6 +433,11 @@ undo_push_image (GImage *gimage,
|
|||
gimage_dirty (gimage);
|
||||
drawable_dirty (drawable_ID);
|
||||
|
||||
x1 = BOUNDS (x1, 0, drawable_width (drawable_ID));
|
||||
y1 = BOUNDS (y1, 0, drawable_height (drawable_ID));
|
||||
x2 = BOUNDS (x2, 0, drawable_width (drawable_ID));
|
||||
y2 = BOUNDS (y2, 0, drawable_height (drawable_ID));
|
||||
|
||||
size = (x2 - x1) * (y2 - y1) * drawable_bytes (drawable_ID) + sizeof (void *) * 2;
|
||||
|
||||
if ((new = undo_push (gimage, size, IMAGE_UNDO)))
|
||||
|
@ -489,6 +494,11 @@ undo_push_image_mod (GImage *gimage,
|
|||
if (! tiles_ptr)
|
||||
return FALSE;
|
||||
|
||||
x1 = BOUNDS (x1, 0, drawable_width (drawable_ID));
|
||||
y1 = BOUNDS (y1, 0, drawable_height (drawable_ID));
|
||||
x2 = BOUNDS (x2, 0, drawable_width (drawable_ID));
|
||||
y2 = BOUNDS (y2, 0, drawable_height (drawable_ID));
|
||||
|
||||
tiles = (TileManager *) tiles_ptr;
|
||||
size = tiles->levels[0].width * tiles->levels[0].height *
|
||||
tiles->levels[0].bpp + sizeof (void *) * 2;
|
||||
|
|
|
@ -330,6 +330,11 @@ gdisplay_flush (GDisplay *gdisp)
|
|||
/* start the currently active tool */
|
||||
active_tool_control (RESUME, (void *) gdisp);
|
||||
}
|
||||
|
||||
/* update the gdisplay's info dialog */
|
||||
if (gdisp->window_info_dialog)
|
||||
info_window_update (gdisp->window_info_dialog,
|
||||
(void *) gdisp);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -153,10 +153,6 @@ change_scale (GDisplay *gdisp,
|
|||
/* resize the image */
|
||||
resize_display (gdisp, allow_resize_windows, TRUE);
|
||||
|
||||
/* update the gdisplay's info dialog */
|
||||
if (gdisp->window_info_dialog)
|
||||
info_window_update (gdisp->window_info_dialog,
|
||||
(void *) gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -330,6 +330,11 @@ gdisplay_flush (GDisplay *gdisp)
|
|||
/* start the currently active tool */
|
||||
active_tool_control (RESUME, (void *) gdisp);
|
||||
}
|
||||
|
||||
/* update the gdisplay's info dialog */
|
||||
if (gdisp->window_info_dialog)
|
||||
info_window_update (gdisp->window_info_dialog,
|
||||
(void *) gdisp);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -153,10 +153,6 @@ change_scale (GDisplay *gdisp,
|
|||
/* resize the image */
|
||||
resize_display (gdisp, allow_resize_windows, TRUE);
|
||||
|
||||
/* update the gdisplay's info dialog */
|
||||
if (gdisp->window_info_dialog)
|
||||
info_window_update (gdisp->window_info_dialog,
|
||||
(void *) gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -330,6 +330,11 @@ gdisplay_flush (GDisplay *gdisp)
|
|||
/* start the currently active tool */
|
||||
active_tool_control (RESUME, (void *) gdisp);
|
||||
}
|
||||
|
||||
/* update the gdisplay's info dialog */
|
||||
if (gdisp->window_info_dialog)
|
||||
info_window_update (gdisp->window_info_dialog,
|
||||
(void *) gdisp);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -334,8 +334,10 @@ channels_dialog_update (int gimage_id)
|
|||
|
||||
channelsD->gimage_id = gimage_id;
|
||||
|
||||
suspend_gimage_notify++;
|
||||
/* Free all elements in the channels listbox */
|
||||
gtk_list_clear_items (GTK_LIST (channelsD->channel_list), 0, -1);
|
||||
suspend_gimage_notify--;
|
||||
|
||||
list = channelsD->channel_widgets;
|
||||
while (list)
|
||||
|
@ -419,7 +421,9 @@ channels_dialog_update (int gimage_id)
|
|||
void
|
||||
channels_dialog_clear ()
|
||||
{
|
||||
suspend_gimage_notify++;
|
||||
gtk_list_clear_items (GTK_LIST (channelsD->channel_list), 0, -1);
|
||||
suspend_gimage_notify--;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -431,8 +435,10 @@ channels_dialog_free ()
|
|||
if (channelsD == NULL)
|
||||
return;
|
||||
|
||||
suspend_gimage_notify++;
|
||||
/* Free all elements in the channels listbox */
|
||||
gtk_list_clear_items (GTK_LIST (channelsD->channel_list), 0, -1);
|
||||
suspend_gimage_notify--;
|
||||
|
||||
list = channelsD->channel_widgets;
|
||||
while (list)
|
||||
|
|
|
@ -1136,7 +1136,7 @@ layers_dialog_set_menu_sensitivity ()
|
|||
/* resize layer */
|
||||
gtk_widget_set_sensitive (layers_ops[6].widget, ac && gimage && lp);
|
||||
/* add layer mask */
|
||||
gtk_widget_set_sensitive (layers_ops[7].widget, fs && ac && gimage && !lm && lp);
|
||||
gtk_widget_set_sensitive (layers_ops[7].widget, fs && ac && gimage && !lm && lp && alpha);
|
||||
/* apply layer mask */
|
||||
gtk_widget_set_sensitive (layers_ops[8].widget, fs && ac && gimage && lm && lp);
|
||||
/* anchor layer */
|
||||
|
|
|
@ -1136,7 +1136,7 @@ layers_dialog_set_menu_sensitivity ()
|
|||
/* resize layer */
|
||||
gtk_widget_set_sensitive (layers_ops[6].widget, ac && gimage && lp);
|
||||
/* add layer mask */
|
||||
gtk_widget_set_sensitive (layers_ops[7].widget, fs && ac && gimage && !lm && lp);
|
||||
gtk_widget_set_sensitive (layers_ops[7].widget, fs && ac && gimage && !lm && lp && alpha);
|
||||
/* apply layer mask */
|
||||
gtk_widget_set_sensitive (layers_ops[8].widget, fs && ac && gimage && lm && lp);
|
||||
/* anchor layer */
|
||||
|
|
|
@ -254,10 +254,6 @@ magnify_button_release (Tool *tool,
|
|||
/* resize the image */
|
||||
resize_display (gdisp, allow_resize_windows, TRUE);
|
||||
|
||||
/* update the window info */
|
||||
if (gdisp->window_info_dialog)
|
||||
info_window_update (gdisp->window_info_dialog,
|
||||
(void *) gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -153,10 +153,6 @@ change_scale (GDisplay *gdisp,
|
|||
/* resize the image */
|
||||
resize_display (gdisp, allow_resize_windows, TRUE);
|
||||
|
||||
/* update the gdisplay's info dialog */
|
||||
if (gdisp->window_info_dialog)
|
||||
info_window_update (gdisp->window_info_dialog,
|
||||
(void *) gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -254,10 +254,6 @@ magnify_button_release (Tool *tool,
|
|||
/* resize the image */
|
||||
resize_display (gdisp, allow_resize_windows, TRUE);
|
||||
|
||||
/* update the window info */
|
||||
if (gdisp->window_info_dialog)
|
||||
info_window_update (gdisp->window_info_dialog,
|
||||
(void *) gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -254,10 +254,6 @@ magnify_button_release (Tool *tool,
|
|||
/* resize the image */
|
||||
resize_display (gdisp, allow_resize_windows, TRUE);
|
||||
|
||||
/* update the window info */
|
||||
if (gdisp->window_info_dialog)
|
||||
info_window_update (gdisp->window_info_dialog,
|
||||
(void *) gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
10
app/undo.c
10
app/undo.c
|
@ -433,6 +433,11 @@ undo_push_image (GImage *gimage,
|
|||
gimage_dirty (gimage);
|
||||
drawable_dirty (drawable_ID);
|
||||
|
||||
x1 = BOUNDS (x1, 0, drawable_width (drawable_ID));
|
||||
y1 = BOUNDS (y1, 0, drawable_height (drawable_ID));
|
||||
x2 = BOUNDS (x2, 0, drawable_width (drawable_ID));
|
||||
y2 = BOUNDS (y2, 0, drawable_height (drawable_ID));
|
||||
|
||||
size = (x2 - x1) * (y2 - y1) * drawable_bytes (drawable_ID) + sizeof (void *) * 2;
|
||||
|
||||
if ((new = undo_push (gimage, size, IMAGE_UNDO)))
|
||||
|
@ -489,6 +494,11 @@ undo_push_image_mod (GImage *gimage,
|
|||
if (! tiles_ptr)
|
||||
return FALSE;
|
||||
|
||||
x1 = BOUNDS (x1, 0, drawable_width (drawable_ID));
|
||||
y1 = BOUNDS (y1, 0, drawable_height (drawable_ID));
|
||||
x2 = BOUNDS (x2, 0, drawable_width (drawable_ID));
|
||||
y2 = BOUNDS (y2, 0, drawable_height (drawable_ID));
|
||||
|
||||
tiles = (TileManager *) tiles_ptr;
|
||||
size = tiles->levels[0].width * tiles->levels[0].height *
|
||||
tiles->levels[0].bpp + sizeof (void *) * 2;
|
||||
|
|
Loading…
Reference in New Issue