Commit d91487e6 authored by Michael Natterer's avatar Michael Natterer 😴

Revert "app: do not forbid merging down floating layers, instead anchor them."

This reverts commit 40bc5307.

It's not *exactly* the same. The floating selection can belong to a
channel or layer mask. Also, this belongs into the GUI layer, not the
core.
parent e7014ddb
......@@ -239,6 +239,13 @@ gimp_image_merge_down (GimpImage *image,
g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
if (gimp_layer_is_floating_sel (current_layer))
{
g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
_("Cannot merge down a floating selection."));
return NULL;
}
for (list = gimp_item_get_container_iter (GIMP_ITEM (current_layer));
list;
list = g_list_next (list))
......@@ -291,22 +298,9 @@ gimp_image_merge_down (GimpImage *image,
GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE,
C_("undo-type", "Merge Down"));
if (gimp_layer_is_floating_sel (current_layer))
{
/* Merging down a floating selection is basically equivalent to
* anchoring it.
*/
floating_sel_anchor (current_layer);
/* layer is already set to the right layer below the floating
* selection, on which we anchored. This will be the return value.
*/
}
else
{
layer = gimp_image_merge_layers (image,
gimp_item_get_container (GIMP_ITEM (current_layer)),
merge_list, context, merge_type);
}
layer = gimp_image_merge_layers (image,
gimp_item_get_container (GIMP_ITEM (current_layer)),
merge_list, context, merge_type);
g_slist_free (merge_list);
gimp_image_undo_group_end (image);
......
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