In the draw tool, if the user draws a very quick stroke (such that 6 or less points...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 13 Feb 2008 11:53:12 +0000 (11:53 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 13 Feb 2008 11:53:12 +0000 (11:53 +0000)
git-svn-id: http://svn.voria.com/code@1689 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/state_draw.cpp

index 9f7f823..6122064 100644 (file)
@@ -755,8 +755,15 @@ StateDraw_Context::process_stroke(StrokeData stroke_data, WidthData width_data,
        }
 
        // If the bline only has one blinepoint, then there is nothing to do.
-       if(bline.size()<=1)
+       if(bline.size() < 2)
+       {
+               // hide the 'stroke' line we were drawing, unless the user
+               // explicitly requests that they are kept
+               if (!getenv("SYNFIG_KEEP_ABORTED_DRAW_LINES"))
+                       refresh_ducks();
+
                return Smach::RESULT_OK;
+       }
 
        if(region_flag)
                return new_region(bline,radius);