From: Carlos Lopez Date: Sun, 28 Jun 2009 14:08:21 +0000 (+0200) Subject: Update Toggle Ducks Actions when Toggle Ducks Buttons changes. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=c14cfdfa762dafa6cd003efb6d8c8a61d1679c78;p=synfig.git Update Toggle Ducks Actions when Toggle Ducks Buttons changes. Before this commit the synchronisation was only from actions to buttons and not the opposite. --- diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index 92882f7..f67e22a 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -3738,6 +3738,21 @@ CanvasView::toggle_duck_mask(Duckmatic::Type type) work_area->queue_draw(); try { + // Update the toggle ducks actions + Glib::RefPtr action; + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-position-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_POSITION)); + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-tangent-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_TANGENT)); + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-vertex-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_VERTEX)); + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-radius-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_RADIUS)); + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-width-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_WIDTH)); + action = Glib::RefPtr::cast_dynamic(action_group->get_action("mask-angle-ducks")); + action->set_active((bool)(work_area->get_type_mask()&Duck::TYPE_ANGLE)); + // Update toggle ducks buttons toggleducksdial->update_toggles(work_area->get_type_mask()); } catch(...)