[gimp] pdb: add missing breaks in switch() so we don't always pattern-fill



commit 1f9965879b0ccac07c2321b1b072ab1a39fd2385
Author: Michael Natterer <mitch gimp org>
Date:   Sat Aug 4 03:13:52 2012 +0200

    pdb: add missing breaks in switch() so we don't always pattern-fill
    
    Same as 439c5a7814561fb5fbaaef372acc732829450ceb, just missed
    the other function.

 app/pdb/edit-cmds.c       |   16 ++++++++++++----
 tools/pdbgen/pdb/edit.pdb |   16 ++++++++++++----
 2 files changed, 24 insertions(+), 8 deletions(-)
---
diff --git a/app/pdb/edit-cmds.c b/app/pdb/edit-cmds.c
index 1171e55..3000c10 100644
--- a/app/pdb/edit-cmds.c
+++ b/app/pdb/edit-cmds.c
@@ -672,13 +672,21 @@ edit_bucket_fill_full_invoker (GimpProcedure         *procedure,
 
           if (! gimp_channel_is_empty (gimp_image_get_mask (image)))
             {
-              GimpFillType fill_type;
+              GimpFillType fill_type = GIMP_FG_BUCKET_FILL;
 
               switch (fill_mode)
                 {
-                case GIMP_FG_BUCKET_FILL:      fill_type = GIMP_FOREGROUND_FILL;
-                case GIMP_BG_BUCKET_FILL:      fill_type = GIMP_BACKGROUND_FILL;
-                case GIMP_PATTERN_BUCKET_FILL: fill_type = GIMP_PATTERN_FILL;
+                case GIMP_FG_BUCKET_FILL:
+                  fill_type = GIMP_FOREGROUND_FILL;
+                  break;
+
+                case GIMP_BG_BUCKET_FILL:
+                  fill_type = GIMP_BACKGROUND_FILL;
+                  break;
+
+                case GIMP_PATTERN_BUCKET_FILL:
+                  fill_type = GIMP_PATTERN_FILL;
+                  break;
                 }
 
               success = gimp_edit_fill (image, drawable, context, fill_type,
diff --git a/tools/pdbgen/pdb/edit.pdb b/tools/pdbgen/pdb/edit.pdb
index 6155ca6..a29a049 100644
--- a/tools/pdbgen/pdb/edit.pdb
+++ b/tools/pdbgen/pdb/edit.pdb
@@ -740,13 +740,21 @@ HELP
 
       if (! gimp_channel_is_empty (gimp_image_get_mask (image)))
         {
-          GimpFillType fill_type;
+          GimpFillType fill_type = GIMP_FG_BUCKET_FILL;
 
           switch (fill_mode)
             {
-            case GIMP_FG_BUCKET_FILL:      fill_type = GIMP_FOREGROUND_FILL;
-            case GIMP_BG_BUCKET_FILL:      fill_type = GIMP_BACKGROUND_FILL;
-            case GIMP_PATTERN_BUCKET_FILL: fill_type = GIMP_PATTERN_FILL;
+            case GIMP_FG_BUCKET_FILL:
+              fill_type = GIMP_FOREGROUND_FILL;
+              break;
+
+            case GIMP_BG_BUCKET_FILL:
+              fill_type = GIMP_BACKGROUND_FILL;
+              break;
+
+            case GIMP_PATTERN_BUCKET_FILL:
+              fill_type = GIMP_PATTERN_FILL;
+              break;
             }
 
           success = gimp_edit_fill (image, drawable, context, fill_type,



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