From: dooglus Date: Mon, 12 Nov 2007 08:34:22 +0000 (+0000) Subject: When editing an angle duck, signal the angle it was rotated through, rather than... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=6be6303c608af39940d01b411021e81c7fff63d2;p=synfig.git When editing an angle duck, signal the angle it was rotated through, rather than the point it was rotated to. This allows the user to rotate an angle duck through multiple rotations. git-svn-id: http://svn.voria.com/code@1138 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/duckmatic.cpp b/synfig-studio/trunk/src/gtkmm/duckmatic.cpp index 072f065..767b217 100644 --- a/synfig-studio/trunk/src/gtkmm/duckmatic.cpp +++ b/synfig-studio/trunk/src/gtkmm/duckmatic.cpp @@ -532,10 +532,21 @@ Duckmatic::signal_edited_selected_ducks() // Go ahead and call everyone's signals for(iter=ducks.begin();iter!=ducks.end();++iter) { - if(!(*iter)->signal_edited()((*iter)->get_point())) + if ((*iter)->get_type() == Duck::TYPE_ANGLE) { - selected_ducks=old_set; - throw String("Bad edit"); + if(!(*iter)->signal_edited_angle()((*iter)->get_rotations())) + { + selected_ducks=old_set; + throw String("Bad edit"); + } + } + else + { + if(!(*iter)->signal_edited()((*iter)->get_point())) + { + selected_ducks=old_set; + throw String("Bad edit"); + } } } selected_ducks=old_set; @@ -1005,7 +1016,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handleset_scalar(param_desc->get_scalar()); } - duck->signal_edited().clear(); + duck->signal_edited().clear(); // value_desc.get_value_type() == ValueBase::TYPE_REAL: duck->signal_edited().connect( sigc::bind( sigc::mem_fun( @@ -1081,12 +1092,13 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handleset_scalar(param_desc->get_scalar()); } - duck->signal_edited().clear(); - duck->signal_edited().connect( + duck->signal_edited().clear(); // value_desc.get_value_type() == ValueBase::TYPE_ANGLE: + duck->signal_edited_angle().clear(); + duck->signal_edited_angle().connect( sigc::bind( sigc::mem_fun( *canvas_view, - &studio::CanvasView::on_duck_changed + &studio::CanvasView::on_duck_angle_changed ), value_desc ) @@ -1179,7 +1191,7 @@ Duckmatic::add_to_ducks(const synfigapp::ValueDesc& value_desc,etl::handleset_type(Duck::TYPE_POSITION); - duck->signal_edited().clear(); + duck->signal_edited().clear(); // value_desc.get_value_type() == ValueBase::TYPE_VECTOR: duck->signal_edited().connect( sigc::bind( sigc::mem_fun(