1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

app: gimp_layer_stack_reorder(): use the passed old_index instead of

remembering it before chaining up.
This commit is contained in:
Michael Natterer
2025-08-09 08:54:36 +02:00
parent d5d6b5e726
commit b49f4a3631

View File

@@ -136,19 +136,15 @@ gimp_layer_stack_reorder (GimpContainer *container,
{
GimpLayerStack *stack = GIMP_LAYER_STACK (container);
gboolean update_backdrop;
gint index;
update_backdrop = gimp_filter_get_active (GIMP_FILTER (object)) &&
gimp_layer_get_excludes_backdrop (GIMP_LAYER (object));
if (update_backdrop)
index = gimp_container_get_child_index (container, object);
GIMP_CONTAINER_CLASS (parent_class)->reorder (container, object,
old_index, new_index);
if (update_backdrop)
gimp_layer_stack_update_range (stack, index, new_index);
gimp_layer_stack_update_range (stack, old_index, new_index);
}