From: dooglus Date: Mon, 12 Nov 2007 08:15:47 +0000 (+0000) Subject: Working on 1827966: Angles are recalculated to 360 mod. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=806f63e7b631aff78434eda0ee3c23b168dcd648;p=synfig.git Working on 1827966: Angles are recalculated to 360 mod. git-svn-id: http://svn.voria.com/code@1136 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index e317406..1d75c65 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -2556,6 +2556,14 @@ CanvasView::on_duck_changed(const synfig::Point &value,const synfigapp::ValueDes return true; } +bool +CanvasView::on_duck_angle_changed(const synfig::Angle &rotation,const synfigapp::ValueDesc& value_desc) +{ + // \todo will this really always be the case? + assert(value_desc.get_value_type() == ValueBase::TYPE_ANGLE); + return canvas_interface()->change_value(value_desc, value_desc.get_value(get_time()).get(Angle()) + rotation); +} + void CanvasView::selected_layer_color_set(Color color) { diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.h b/synfig-studio/trunk/src/gtkmm/canvasview.h index a22daed..39658a4 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.h +++ b/synfig-studio/trunk/src/gtkmm/canvasview.h @@ -668,6 +668,7 @@ private: void on_audio_offset_notify(); bool on_duck_changed(const synfig::Point &value,const synfigapp::ValueDesc& value_desc); + bool on_duck_angle_changed(const synfig::Angle &rotation,const synfigapp::ValueDesc& value_desc); void on_layer_toggle(synfig::Layer::Handle);