[gimp/soc-2013-combined-selection-tool: 199/230] app:selectbyshape Single row select tool



commit 8ac989826c262575ce8a86632a5c5c3662d36eb6
Author: Ajay Ramanathan <ajay 010293 gmail com>
Date:   Tue Jul 9 07:58:53 2013 +0530

    app:selectbyshape Single row select tool

 app/tools/gimpselectbyshapetool.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/app/tools/gimpselectbyshapetool.c b/app/tools/gimpselectbyshapetool.c
index e772612..e92eaf3 100644
--- a/app/tools/gimpselectbyshapetool.c
+++ b/app/tools/gimpselectbyshapetool.c
@@ -125,8 +125,10 @@ gimp_select_by_shape_tool_select (GimpRectangleSelectTool *rect_tool,
   GimpSelectionOptions       *options = GIMP_SELECTION_TOOL_GET_OPTIONS (rect_tool);
   GimpRectangleSelectOptions *sel_options     = GIMP_RECTANGLE_SELECT_TOOL_GET_OPTIONS (tool);
   GimpChannel                *channel;
+  GimpImage                *image;
   
   channel = gimp_image_get_mask (gimp_display_get_image (tool->display));
+  image = gimp_display_get_image (tool->display);
 
   switch(sel_options->shape_type)
    {
@@ -172,14 +174,14 @@ gimp_select_by_shape_tool_select (GimpRectangleSelectTool *rect_tool,
 
      case GIMP_SHAPE_SINGLE_ROW :
       {
-        gdouble w1 = gimp_image_get_width (operation);
-        gdouble h1 = gimp_image_get_height (operation);
+        gdouble w1 = gimp_image_get_width (image);
+        gdouble h1 = gimp_image_get_height (image);
 
        switch(sel_options->line_orientation)
         {
           case GIMP_ORIENTATION_HORIZONTAL :
           gimp_channel_select_rectangle (channel,
-                                        x, 0, w1, 1,
+                                        x, 0, 1, 1000,
                                         operation,
                                         options->feather,
                                         options->feather_radius,


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