new_grid: Add options for rulers_follow_grid and grid_follows_internal
[ardour.git] / gtk2_ardour / editor_mouse.cc
index df559cf8f03c4e0935df40bdb2cb6fbd0e5a7b52..4b15b5d0e0daa85b61897d96bb9e0dd84315099a 100644 (file)
@@ -317,7 +317,10 @@ Editor::mouse_mode_toggled (MouseMode 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()) {
+       if (!UIConfiguration::instance().get_grid_follows_internal()) {
+               grid_type_action(pre_internal_grid_type)->set_active(true);
+               snap_mode_action(pre_internal_snap_mode)->set_active(true);
+       } else if (!was_internal && internal_editing()) {
                grid_type_action(internal_grid_type)->set_active(true);
                snap_mode_action(internal_snap_mode)->set_active(true);
        } else if (was_internal && !internal_editing()) {