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

Compare commits

...

1 Commits

Author SHA1 Message Date
Alx Sa
0e55285859 actions: Merge floating selection with Select None
In Paintshop Pro, you can merge floating selections
down with Select None.
This patch adds that same functionality to GIMP.
2025-05-14 09:22:25 -03:00
2 changed files with 7 additions and 1 deletions

View File

@@ -186,7 +186,7 @@ select_actions_update (GimpActionGroup *group,
gimp_action_group_set_action_sensitive (group, action, (condition) != 0, NULL)
SET_SENSITIVE ("select-all", image && ! sel_all);
SET_SENSITIVE ("select-none", image && sel);
SET_SENSITIVE ("select-none", image && (sel || fs));
SET_SENSITIVE ("select-invert", image);
SET_SENSITIVE ("select-cut-float", g_list_length (drawables) == 1 && sel &&

View File

@@ -30,6 +30,7 @@
#include "core/gimp.h"
#include "core/gimpchannel.h"
#include "core/gimplayer-floating-selection.h"
#include "core/gimpimage.h"
#include "core/gimpselection.h"
@@ -97,6 +98,11 @@ select_none_cmd_callback (GimpAction *action,
return_if_no_image (image, data);
gimp_channel_clear (gimp_image_get_mask (image), NULL, TRUE);
/* Commit floating selection (if any) */
if (gimp_image_get_floating_selection (image))
floating_sel_anchor (gimp_image_get_floating_selection (image));
gimp_image_flush (image);
}