mirror of https://github.com/GNOME/gimp.git
app: fix action_data_get_image() to return NULL more often
If "data" is a GimpItemTreeView or a GimpImageEditor, we REALLY want only the image from these dialogs, even if NULL, and NOT some other image from a display or context that randomly is around anyway. Fixes the sensitivity states of lots of buttons in these dialogs.
This commit is contained in:
parent
c9122fed2f
commit
c4f71f553c
|
@ -365,9 +365,17 @@ action_data_get_image (gpointer data)
|
|||
recursion = TRUE;
|
||||
|
||||
if (GIMP_IS_ITEM_TREE_VIEW (data))
|
||||
result = gimp_item_tree_view_get_image ((GimpItemTreeView *) data);
|
||||
{
|
||||
result = gimp_item_tree_view_get_image ((GimpItemTreeView *) data);
|
||||
recursion = FALSE;
|
||||
return result;
|
||||
}
|
||||
else if (GIMP_IS_IMAGE_EDITOR (data))
|
||||
result = ((GimpImageEditor *) data)->image;
|
||||
{
|
||||
result = ((GimpImageEditor *) data)->image;
|
||||
recursion = FALSE;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (! result)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue