Separate checks for "writable" from "is group" when setting sensitivity
This commit is contained in:
@ -133,11 +133,12 @@ void
|
||||
select_actions_update (GimpActionGroup *group,
|
||||
gpointer data)
|
||||
{
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
GimpImage *image = action_data_get_image (data);
|
||||
GimpDrawable *drawable = NULL;
|
||||
gboolean fs = FALSE;
|
||||
gboolean sel = FALSE;
|
||||
gboolean writable = FALSE;
|
||||
gboolean children = FALSE;
|
||||
|
||||
if (image)
|
||||
{
|
||||
@ -146,6 +147,9 @@ select_actions_update (GimpActionGroup *group,
|
||||
if (drawable)
|
||||
{
|
||||
writable = ! gimp_item_get_lock_content (GIMP_ITEM (drawable));
|
||||
|
||||
if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
|
||||
children = TRUE;
|
||||
}
|
||||
|
||||
fs = (gimp_image_get_floating_selection (image) != NULL);
|
||||
@ -158,7 +162,7 @@ select_actions_update (GimpActionGroup *group,
|
||||
SET_SENSITIVE ("select-all", drawable);
|
||||
SET_SENSITIVE ("select-none", drawable && sel);
|
||||
SET_SENSITIVE ("select-invert", drawable);
|
||||
SET_SENSITIVE ("select-float", writable && sel);
|
||||
SET_SENSITIVE ("select-float", writable && !children && sel);
|
||||
|
||||
SET_SENSITIVE ("select-feather", drawable && sel);
|
||||
SET_SENSITIVE ("select-sharpen", drawable && sel);
|
||||
|
Reference in New Issue
Block a user