From: dooglus Date: Sat, 29 Mar 2008 13:32:45 +0000 (+0000) Subject: Tidying. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=2a35e3479c23f8045bbf46d6354ff2e2c02be35d;p=synfig.git Tidying. git-svn-id: http://svn.voria.com/code@1937 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/duckmatic.cpp b/synfig-studio/trunk/src/gtkmm/duckmatic.cpp index 7366ebc..5b46dda 100644 --- a/synfig-studio/trunk/src/gtkmm/duckmatic.cpp +++ b/synfig-studio/trunk/src/gtkmm/duckmatic.cpp @@ -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; }