X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fduckmatic.cpp;h=485b9f62c954b049cca9d69ca2d86353488cf367;hb=ee303c8406912a41b5e6c838b131c0777abd8014;hp=c620329f6bffdbda01b09135d6b449b6d8a9e064;hpb=a2dcd900eabab0ceab8c55231cef6264f8b07e49;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/duckmatic.cpp b/synfig-studio/trunk/src/gtkmm/duckmatic.cpp index c620329..485b9f6 100644 --- a/synfig-studio/trunk/src/gtkmm/duckmatic.cpp +++ b/synfig-studio/trunk/src/gtkmm/duckmatic.cpp @@ -399,8 +399,14 @@ Duckmatic::get_duck_list()const { DuckList ret; DuckMap::const_iterator iter; + for(iter=duck_map.begin();iter!=duck_map.end();++iter) if (iter->second->get_type()&Duck::TYPE_POSITION) ret.push_back(iter->second); + for(iter=duck_map.begin();iter!=duck_map.end();++iter) if (iter->second->get_type()&Duck::TYPE_VERTEX ) ret.push_back(iter->second); + for(iter=duck_map.begin();iter!=duck_map.end();++iter) if (iter->second->get_type()&Duck::TYPE_TANGENT ) ret.push_back(iter->second); for(iter=duck_map.begin();iter!=duck_map.end();++iter) - ret.push_back(iter->second); + if (!(iter->second->get_type()&Duck::TYPE_POSITION) && + !(iter->second->get_type()&Duck::TYPE_VERTEX) && + !(iter->second->get_type()&Duck::TYPE_TANGENT)) + ret.push_back(iter->second); return ret; } @@ -881,15 +887,15 @@ Duckmatic::find_duck(synfig::Point point, synfig::Real radius, Duck::Type type) if(duck->get_type()&Duck::TYPE_VERTEX) dist*=1.0001; + else if(duck->get_type()&Duck::TYPE_TANGENT && duck->get_scalar()>0) + dist*=1.00005; else if(duck->get_type()&Duck::TYPE_RADIUS) dist*=0.9999; - if(dist<=closest && !( duck->get_type() && (!(type & duck->get_type())) ) ) + if(distget_type() && (!(type & duck->get_type())) ) ) { - { - closest=dist; - ret=duck; - } + closest=dist; + ret=duck; } }