Tidying.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 29 Mar 2008 13:32:45 +0000 (13:32 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 29 Mar 2008 13:32:45 +0000 (13:32 +0000)
git-svn-id: http://svn.voria.com/code@1937 1f10aa63-cdf2-0310-b900-c93c546f37ac

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

index 7366ebc..5b46dda 100644 (file)
@@ -506,20 +506,16 @@ DuckDrag_Translate::duck_drag(Duckmatic* duckmatic, const synfig::Vector& vector
        synfig::Vector vect(duckmatic->snap_point_to_grid(vector)-drag_offset_);
        int i;
 
+       // drag the vertex and position ducks first
        for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
-       {
-               if((*iter)->get_type()!=Duck::TYPE_VERTEX &&
-                  (*iter)->get_type()!=Duck::TYPE_POSITION)
-                       continue;
-               (*iter)->set_trans_point(positions[i]+vect);
-       }
+               if((*iter)->get_type() == Duck::TYPE_VERTEX || (*iter)->get_type() == Duck::TYPE_POSITION)
+                       (*iter)->set_trans_point(positions[i]+vect);
+
+       // then drag the others
        for(i=0,iter=selected_ducks.begin();iter!=selected_ducks.end();++iter,i++)
-       {
-               if((*iter)->get_type()==Duck::TYPE_VERTEX ||
-                  (*iter)->get_type()==Duck::TYPE_POSITION)
-                       continue;
-               (*iter)->set_trans_point(positions[i]+vect);
-       }
+               if((*iter)->get_type() != Duck::TYPE_VERTEX && (*iter)->get_type() != Duck::TYPE_POSITION)
+                       (*iter)->set_trans_point(positions[i]+vect);
+
        last_translate_=vect;
 }