[gimp] app: layers_text_tool_cmd_callback() is not supposed to be run on...
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: layers_text_tool_cmd_callback() is not supposed to be run on...
- Date: Fri, 12 May 2017 22:06:46 +0000 (UTC)
commit 526918b26cd17575a753c3b98e9cc0961f47ba68
Author: Jehan <jehan girinstud io>
Date: Sat May 13 00:01:56 2017 +0200
app: layers_text_tool_cmd_callback() is not supposed to be run on...
... non-text layers.
Since commit 10099bd, the action will be non-sensitive with non-text
layers, so if it happens, there is a bug somewhere. Therefore
g_return_if_fail() on this condition.
Moreover opening the edit attributes dialog was absolutely confusing on
what this action is supposed to do. We should not have these kind of
random behaviors.
app/actions/layers-commands.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/app/actions/layers-commands.c b/app/actions/layers-commands.c
index 2693eb6..d1f40a8 100644
--- a/app/actions/layers-commands.c
+++ b/app/actions/layers-commands.c
@@ -186,11 +186,7 @@ layers_text_tool_cmd_callback (GtkAction *action,
return_if_no_layer (image, layer, data);
return_if_no_widget (widget, data);
- if (! gimp_item_is_text_layer (GIMP_ITEM (layer)))
- {
- layers_edit_attributes_cmd_callback (action, data);
- return;
- }
+ g_return_if_fail (gimp_item_is_text_layer (GIMP_ITEM (layer)));
active_tool = tool_manager_get_active (image->gimp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]