From 6be6303c608af39940d01b411021e81c7fff63d2 Mon Sep 17 00:00:00 2001 From: dooglus Date: Mon, 12 Nov 2007 08:34:22 +0000 Subject: [PATCH] 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 --- synfig-studio/trunk/src/gtkmm/duckmatic.cpp | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) 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( -- 2.7.4