[gimp] Bug 740778 - fix transformtools
- From: Thomas Manni <tmanni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Bug 740778 - fix transformtools
- Date: Thu, 27 Nov 2014 07:32:09 +0000 (UTC)
commit 5ae6c8b1b3239a442f74766c8b028de249991cf0
Author: Thomas Manni <thomas manni free fr>
Date: Thu Nov 27 08:30:56 2014 +0100
Bug 740778 - fix transformtools
Do not enable transform tools in selection mode when no selection exists.
app/tools/gimptransformtool.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/app/tools/gimptransformtool.c b/app/tools/gimptransformtool.c
index d2763bb..0a15aa8 100644
--- a/app/tools/gimptransformtool.c
+++ b/app/tools/gimptransformtool.c
@@ -1792,7 +1792,13 @@ gimp_transform_tool_get_active_item (GimpTransformTool *tr_tool,
return GIMP_ITEM (gimp_image_get_active_drawable (image));
case GIMP_TRANSFORM_TYPE_SELECTION:
- return GIMP_ITEM (gimp_image_get_mask (image));
+ {
+ GimpChannel *selection_mask = gimp_image_get_mask (image);
+ if (selection_mask && gimp_channel_is_empty (selection_mask))
+ return NULL;
+ else
+ return GIMP_ITEM (selection_mask));
+ }
case GIMP_TRANSFORM_TYPE_PATH:
return GIMP_ITEM (gimp_image_get_active_vectors (image));
@@ -1832,9 +1838,9 @@ gimp_transform_tool_check_active_item (GimpTransformTool *tr_tool,
break;
case GIMP_TRANSFORM_TYPE_SELECTION:
- /* cannot happen, so don't translate these messages */
- null_message = "There is no selection to transform.";
+ null_message = _("There is no selection to transform.");
+ /* cannot happen, so don't translate these messages */
if (item && gimp_item_is_content_locked (item))
locked_message = "The selection's pixels are locked.";
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]