The bline tool was sometimes showing the first duck in the new bline as green once...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 18 Feb 2008 18:08:11 +0000 (18:08 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 18 Feb 2008 18:08:11 +0000 (18:08 +0000)
git-svn-id: http://svn.voria.com/code@1747 1f10aa63-cdf2-0310-b900-c93c546f37ac

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

index 61a30b2..f1f2221 100644 (file)
@@ -64,6 +64,9 @@ using namespace studio;
 
 /* === M A C R O S ========================================================= */
 
+// if defined, show the first duck as green while drawing
+//#define DISTINGUISH_FIRST_DUCK
+
 /* === G L O B A L S ======================================================= */
 
 StateBLine studio::state_bline;
@@ -988,7 +991,12 @@ StateBLine_Context::refresh_ducks(bool button_down)
                // First add the duck associated with this vertex
                duck=new WorkArea::Duck(bline_point.get_vertex());
                duck->set_editable(true);
+#ifdef DISTINGUISH_FIRST_DUCK
+               if (iter!=bline_point_list.begin())
+                       duck->set_type(Duck::TYPE_VERTEX);
+#else
                duck->set_type(Duck::TYPE_VERTEX);
+#endif
                duck->set_name(strprintf("%x-vertex",value_node.get()));
                duck->signal_edited().connect(
                        sigc::bind(sigc::mem_fun(*this,&studio::StateBLine_Context::on_vertex_change),value_node)
@@ -1091,6 +1099,9 @@ StateBLine_Context::refresh_ducks(bool button_down)
 
                duck=new WorkArea::Duck(bline_point.get_vertex());
                duck->set_editable(true);
+#ifndef DISTINGUISH_FIRST_DUCK
+               duck->set_type(Duck::TYPE_VERTEX);
+#endif
                duck->set_name(strprintf("%x-vertex",bline_point_list.front().get()));
                duck->signal_edited().connect(
                        sigc::bind(sigc::mem_fun(*this,&studio::StateBLine_Context::on_vertex_change),bline_point_list.front())