diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 21c4040df3..35acfe5488 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -3426,8 +3426,20 @@ These settings will only take effect after %1 is restarted.\n\ sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_rulers_follow_grid) )); - add_option (_("Editor/Snap"), new OptionEditorHeading (_("When \"Snap\" is enabled, snap to:"))); + add_option (_("Editor/Snap"), new OptionEditorHeading (_("Snap Target Mode:"))); + ComboOption *stm = new ComboOption ( + "snap-target", + _("When the Grid is enabled, snap to"), + sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_snap_target), + sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_snap_target)); + + stm->add(SnapTargetGrid, _("Grid")); + stm->add(SnapTargetOther, _("Snap Targets")); + stm->add(SnapTargetBoth, _("Both the Grid and Snap Targets")); + add_option (_("Editor/Snap"), stm); + + add_option (_("Editor/Snap"), new OptionEditorHeading (_("Snap Targets:"))); add_option (_("Editor/Snap"), new BoolOption ( diff --git a/gtk2_ardour/ui_config_vars.h b/gtk2_ardour/ui_config_vars.h index 447e1dc24a..fcd2995b12 100644 --- a/gtk2_ardour/ui_config_vars.h +++ b/gtk2_ardour/ui_config_vars.h @@ -134,6 +134,7 @@ UI_CONFIG_VARIABLE (bool, use_note_color_for_velocity, "use-note-color-for-veloc UI_CONFIG_VARIABLE (bool, show_snapped_cursor, "show-snapped-cursor", true) UI_CONFIG_VARIABLE (uint32_t, snap_threshold, "snap-threshold", 25) UI_CONFIG_VARIABLE (uint32_t, ruler_granularity, "ruler-granularity", 25) +UI_CONFIG_VARIABLE (ARDOUR::SnapTarget, snap_target, "snap-target", ARDOUR::SnapTargetGrid) UI_CONFIG_VARIABLE (bool, snap_to_marks, "snap-to-marks", true) UI_CONFIG_VARIABLE (bool, snap_to_playhead, "snap-to-playhead", true) UI_CONFIG_VARIABLE (bool, snap_to_region_sync, "snap-to-region-sync", true)