Move live feedback code into duckmatic.
[synfig.git] / synfig-studio / src / gtkmm / state_normal.cpp
index 98bb56a..15a7b43 100644 (file)
@@ -7,6 +7,7 @@
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
 **     Copyright (c) 2007, 2008 Chris Moore
+**     Copyright (c) 2009 Nikita Kitaev
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -34,6 +35,7 @@
 #include <gtkmm/entry.h>
 
 #include <synfig/valuenode_animated.h>
+#include <synfig/valuenode_blinecalcvertex.h>
 #include <synfig/valuenode_composite.h>
 #include <synfig/valuenode_const.h>
 #include <synfig/valuenode_dynamiclist.h>
@@ -410,15 +412,6 @@ DuckDrag_Combo::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
                        if((*iter)->get_type()!=Duck::TYPE_VERTEX&&(*iter)->get_type()!=Duck::TYPE_POSITION)
                                (*iter)->set_trans_point(positions[i]+vect, time);
                }
-               DuckList duck_list(duckmatic->get_duck_list());
-               for (iter=duck_list.begin(); iter!=duck_list.end(); ++iter)
-               {
-                       if ((*iter)->get_type() == Duck::TYPE_TANGENT || (*iter)->get_type() == Duck::TYPE_WIDTH)
-                       {
-                               (*iter)->update(time);
-                       }
-               }
-               return;
        }
 
        if (rotate)
@@ -506,6 +499,10 @@ DuckDrag_Combo::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector)
                        (*iter)->set_trans_point(p, time);
                }
        }
+
+       // then patch up the tangents for the vertices we've moved
+       duckmatic->update_ducks();
+
        last_move=vect;
 }