Reorder the rows so the checkboxes are together at the end.
[synfig.git] / synfig-studio / trunk / src / gtkmm / state_bline.cpp
index 61a30b2..f632f2e 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;
@@ -324,7 +327,7 @@ StateBLine_Context::increment_id()
                String str_number;
                str_number=String(id,id.size()-digits,id.size());
                id=String(id,0,id.size()-digits);
-               synfig::info("---------------- \"%s\"",str_number.c_str());
+               // synfig::info("---------------- \"%s\"",str_number.c_str());
 
                number=atoi(str_number.c_str());
        }
@@ -475,7 +478,7 @@ StateBLine_Context::~StateBLine_Context()
 Smach::event_result
 StateBLine_Context::event_stop_handler(const Smach::event& /*x*/)
 {
-       synfig::info("STATE RotoBLine: Received Stop Event");
+//     synfig::info("STATE RotoBLine: Received Stop Event");
 //     run();
        reset();
 //     throw Smach::egress_exception();
@@ -486,7 +489,7 @@ StateBLine_Context::event_stop_handler(const Smach::event& /*x*/)
 Smach::event_result
 StateBLine_Context::event_refresh_handler(const Smach::event& /*x*/)
 {
-       synfig::info("STATE RotoBLine: Received Refresh Event");
+//     synfig::info("STATE RotoBLine: Received Refresh Event");
        refresh_ducks();
        return Smach::RESULT_ACCEPT;
 }
@@ -600,6 +603,8 @@ StateBLine_Context::run_()
                if(!canvas)
                        canvas=get_canvas_view()->get_canvas();
 
+               value_node_bline->set_member_canvas(canvas);
+
                synfigapp::SelectionManager::LayerList layer_selection;
 
                ///////////////////////////////////////////////////////////////////////////
@@ -906,7 +911,7 @@ StateBLine_Context::event_mouse_release_handler(const Smach::event& /*x*/)
 Smach::event_result
 StateBLine_Context::event_mouse_click_handler(const Smach::event& x)
 {
-       synfig::info("STATE BLINE: Received mouse button down Event");
+       // synfig::info("STATE BLINE: Received mouse button down Event");
        const EventMouse& event(*reinterpret_cast<const EventMouse*>(&x));
        switch(event.button)
        {
@@ -988,7 +993,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 +1101,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())