mirror of https://github.com/GNOME/gimp.git
app: don't highlight layers dialog "new" button when pasting to channel
We disallow creating a new layer from a floating selection when its associated drawable is a channel, so there's no point in highlighting the "new layer" button in this case. Note that the "layers-new" action remains sensitive, showing an error message if activated. Not sure if it's a good thing or not, but whatever.
This commit is contained in:
parent
7dd373293c
commit
378c5d3b87
|
@ -32,11 +32,13 @@
|
|||
#include "widgets-types.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpchannel.h"
|
||||
#include "core/gimpcontainer.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpitemundo.h"
|
||||
#include "core/gimplayer.h"
|
||||
#include "core/gimplayer-floating-selection.h"
|
||||
#include "core/gimplayer-new.h"
|
||||
#include "core/gimplayermask.h"
|
||||
#include "core/gimptreehandler.h"
|
||||
|
@ -930,7 +932,8 @@ gimp_layer_tree_view_floating_selection_changed (GimpImage *image,
|
|||
|
||||
gimp_highlightable_button_set_highlight (
|
||||
GIMP_HIGHLIGHTABLE_BUTTON (gimp_item_tree_view_get_new_button (item_view)),
|
||||
floating_sel != NULL);
|
||||
floating_sel != NULL &&
|
||||
! GIMP_IS_CHANNEL (gimp_layer_get_floating_sel_drawable (floating_sel)));
|
||||
gimp_highlightable_button_set_highlight (
|
||||
GIMP_HIGHLIGHTABLE_BUTTON (gimp_item_tree_view_get_delete_button (item_view)),
|
||||
floating_sel != NULL);
|
||||
|
|
Loading…
Reference in New Issue