From a1373cb0b813709f46c5d688b554ef5db7ea59ff Mon Sep 17 00:00:00 2001 From: dooglus Date: Mon, 18 Feb 2008 18:08:11 +0000 Subject: [PATCH] The bline tool was sometimes showing the first duck in the new bline as green once the line was looped. This change makes it always do that. git-svn-id: http://svn.voria.com/code@1747 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/state_bline.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/synfig-studio/trunk/src/gtkmm/state_bline.cpp b/synfig-studio/trunk/src/gtkmm/state_bline.cpp index 61a30b2..f1f2221 100644 --- a/synfig-studio/trunk/src/gtkmm/state_bline.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_bline.cpp @@ -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()) -- 2.7.4