diff options
author | David Robillard <d@drobilla.net> | 2014-12-24 15:11:25 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-12-24 15:11:25 -0500 |
commit | fb5ea0ca92ed1e59ac74c80e5e9fa993b4808c0b (patch) | |
tree | d298808f03ca2254d79a7156e98b06463cce182f | |
parent | b0f1c16e207e0c0cd0d6dcc5b509ecb5c1844b5f (diff) |
Fix sticky snap mode/type selectors.
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 6d73d32cc0..1dd99763e9 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -296,14 +296,15 @@ Editor::mouse_mode_toggled (MouseMode m) mouse_mode = m; + /* Switch snap type/mode if we're moving to/from an internal tool. Note + this must toggle the actions and not call set_snap_*() directly, + otherwise things get out of sync and the combo box stops working. */ if (!was_internal && internal_editing()) { - /* switched to internal, switch to internal snap settings */ - set_snap_to(internal_snap_type); - set_snap_mode(internal_snap_mode); + snap_type_action(internal_snap_type)->set_active(true); + snap_mode_action(internal_snap_mode)->set_active(true); } else if (was_internal && !internal_editing()) { - /* switched out of internal, switch to non-internal snap settings */ - set_snap_to(pre_internal_snap_type); - set_snap_mode(pre_internal_snap_mode); + snap_type_action(pre_internal_snap_type)->set_active(true); + snap_mode_action(pre_internal_snap_mode)->set_active(true); } instant_save (); |