Code

pencil tool: don't use sp_curve_length macro but good function ;)
authorjohanengelen <johanengelen@users.sourceforge.net>
Mon, 30 Jun 2008 19:42:01 +0000 (19:42 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Mon, 30 Jun 2008 19:42:01 +0000 (19:42 +0000)
src/pencil-context.cpp

index 3e0e793f6cf397a8458fc241a92563605a4e62a1..2aac6ec0ab097ffe1ea1f91faa2b2bcf44acae02 100644 (file)
@@ -570,7 +570,7 @@ spdc_set_endpoint(SPPencilContext *const pc, NR::Point const p)
 static void
 spdc_finish_endpoint(SPPencilContext *const pc)
 {
-    if ( ( SP_CURVE_LENGTH(pc->red_curve) != 2 )
+    if ( ( pc->red_curve->get_segment_count() != 1 )
          || ( pc->red_curve->first_point() == pc->red_curve->second_point()   ) )
     {
         pc->red_curve->reset();