X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fduckmatic.cpp;h=084f642967cbfef38372ef628f1984305d8cceee;hb=c262dc6238e787c97aa7422fc907d0c1a5158965;hp=f5e52dedde5f52e47bf92fb39e474b6b34c24b88;hpb=c797a5de358807f73c2e2ed21d4f01b6a66d597e;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/duckmatic.cpp b/synfig-studio/trunk/src/gtkmm/duckmatic.cpp index f5e52de..084f642 100644 --- a/synfig-studio/trunk/src/gtkmm/duckmatic.cpp +++ b/synfig-studio/trunk/src/gtkmm/duckmatic.cpp @@ -108,18 +108,6 @@ Duckmatic::~Duckmatic() } void -Duckmatic::set_flip_x(bool flip_x) -{ - flip_x_ = flip_x; -} - -void -Duckmatic::set_flip_y(bool flip_y) -{ - flip_y_ = flip_y; -} - -void Duckmatic::clear_ducks() { duck_data_share_map.clear(); @@ -564,12 +552,12 @@ Duckmatic::signal_edited_selected_ducks() Point point((*iter)->get_point()); bool changed = false; - if (point[0] * (flip_x_ ? -1 : 1) < 0) + if (point[0] < 0) { point[0] = 0; changed = true; } - if (point[1] * (flip_y_ ? -1 : 1) < 0) + if (point[1] < 0) { point[1] = 0; changed = true; @@ -1036,8 +1024,8 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handleset_radius(true); duck->set_type(Duck::TYPE_RADIUS); - // put the duck on the right hand side of the center, whether the display is flipped or not - duck->set_point(Point(value_desc.get_value(get_time()).get(Real()) * (flip_x_ ? -1 : 1), 0)); + // put the duck on the right hand side of the center + duck->set_point(Point(value_desc.get_value(get_time()).get(Real()), 0)); duck->set_name(guid_string(value_desc)); if(value_desc.is_value_node()) { @@ -1707,6 +1695,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handleget_contained_type()==ValueBase::TYPE_VECTOR) { Bezier bezier; + int first = -1; for(i=0;ilink_count();i++) { if(!value_node->list[i].status_at_time(get_time())) @@ -1715,6 +1704,10 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle duck(last_duck()); + // remember the index of the first vertex we didn't skip + if (first == -1) + first = i; + if(param_desc) { synfigapp::ValueDesc value_desc_origin(value_desc.get_layer(),param_desc->get_origin()); @@ -1732,7 +1725,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handle0) + if (first != i) { handle bezier_(new Bezier()); bezier_->p1=bezier.p1;