mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 09:23:24 +00:00
core, display: Enable resize for GUI layer copying
Resolves #12428 (for now) As noted by Thomas Manni, GimpDrawable does not initialize its push_resize_undo value except via gimp_drawable_new (). If the drawable is created in some other way, it defaults to FALSE and does not save the original size in history when resized or cropped. Thomas proposed initializing it to TRUE in the init () function. This is likely the correct approach, but could cause some new bugs right before the 3.0 release. For now, this patch calls gimp_drawable_enable_resize_undo () for GUI-specific operations (like opening as layers or dragging and dropping layers) to fix the regression for 3.0. Afterwards, we can spend time confirming the init () approach and switch over to that.
This commit is contained in:
parent
f63dfe8ec0
commit
975d1a4aa3
2 changed files with 2 additions and 0 deletions
|
@ -5497,6 +5497,7 @@ gimp_image_add_layers (GimpImage *image,
|
|||
|
||||
gimp_image_add_layer (image, GIMP_LAYER (new_item),
|
||||
parent, position, TRUE);
|
||||
gimp_drawable_enable_resize_undo (GIMP_DRAWABLE (new_item));
|
||||
position++;
|
||||
}
|
||||
|
||||
|
|
|
@ -292,6 +292,7 @@ gimp_display_shell_drop_drawable (GtkWidget *widget,
|
|||
|
||||
gimp_image_add_layer (image, new_layer,
|
||||
GIMP_IMAGE_ACTIVE_PARENT, -1, TRUE);
|
||||
gimp_drawable_enable_resize_undo (GIMP_DRAWABLE (new_layer));
|
||||
|
||||
gimp_image_undo_group_end (image);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue