[gimp] app: don't highlight layers dialog "new" button when pasting to channel
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: don't highlight layers dialog "new" button when pasting to channel
- Date: Wed, 7 Mar 2018 14:40:49 +0000 (UTC)
commit 378c5d3b87f1dc81e1e7c9588d500b460d8665ac
Author: Ell <ell_se yahoo com>
Date: Wed Mar 7 09:31:02 2018 -0500
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.
app/widgets/gimplayertreeview.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/app/widgets/gimplayertreeview.c b/app/widgets/gimplayertreeview.c
index 15d7b89..519f00b 100644
--- a/app/widgets/gimplayertreeview.c
+++ b/app/widgets/gimplayertreeview.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]