[gimp] app: display a status error when seamless cloning without foreground image.



commit 5ca9240d7423151f5c57a374064535d4048670ff
Author: Jehan <jehan girinstud io>
Date:   Mon Apr 28 22:35:51 2014 +1200

    app: display a status error when seamless cloning without foreground image.

 app/tools/gimpseamlessclonetool.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/app/tools/gimpseamlessclonetool.c b/app/tools/gimpseamlessclonetool.c
index 4843e9c..8217c2a 100644
--- a/app/tools/gimpseamlessclonetool.c
+++ b/app/tools/gimpseamlessclonetool.c
@@ -286,8 +286,12 @@ gimp_seamless_clone_tool_start (GimpSeamlessCloneTool *sc,
       GimpBuffer *buffer = gimp_clipboard_get_buffer (tool->tool_info->gimp);
 
       if (! buffer)
-        /* TODO: prompt for some error message */
-        return;
+        {
+          gimp_tool_push_status (tool, display,
+                                 "%s",
+                                 _("There is no image data in the clipboard to paste."));
+          return;
+        }
 
       sc->paste = gegl_buffer_dup (gimp_buffer_get_buffer (buffer));
       g_object_unref (buffer);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]