Add Editor preference to snap to playhead position.
This commit is contained in:
parent
78216b422f
commit
d82ece39e1
|
@ -3173,6 +3173,11 @@ Editor::snap_to_internal (timepos_t& start, Temporal::RoundMode direction, SnapP
|
|||
check_best_snap (presnap, test, dist, best);
|
||||
}
|
||||
|
||||
if ((pref == SnapToAny_Visual) && uic.get_snap_to_playhead ()) {
|
||||
test = timepos_t (_session->audible_sample());
|
||||
check_best_snap (presnap, test, dist, best);
|
||||
}
|
||||
|
||||
/* check snap-to-region-{start/end/sync} */
|
||||
if ((pref == SnapToAny_Visual) && (uic.get_snap_to_region_start () || uic.get_snap_to_region_end () || uic.get_snap_to_region_sync ())) {
|
||||
|
||||
|
|
|
@ -204,6 +204,8 @@
|
|||
snap grid editor mouse
|
||||
[snap-to-marks]
|
||||
snap grid editor mouse markers marks
|
||||
[snap-to-playhead]
|
||||
snap grid editor mouse playhead
|
||||
[snap-to-region-end]
|
||||
snap grid editor mouse regions boundaries boundary
|
||||
[snap-to-region-start]
|
||||
|
|
|
@ -3393,6 +3393,14 @@ These settings will only take effect after %1 is restarted.\n\
|
|||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_snap_to_marks)
|
||||
));
|
||||
|
||||
add_option (_("Editor/Snap"),
|
||||
new BoolOption (
|
||||
"snap-to-playhead",
|
||||
_("Playhead"),
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::get_snap_to_playhead),
|
||||
sigc::mem_fun (UIConfiguration::instance(), &UIConfiguration::set_snap_to_playhead)
|
||||
));
|
||||
|
||||
add_option (_("Editor/Snap"),
|
||||
new BoolOption (
|
||||
"snap-to-region-sync",
|
||||
|
|
|
@ -132,6 +132,7 @@ 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 (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)
|
||||
UI_CONFIG_VARIABLE (bool, snap_to_region_start, "snap-to-region-start", true)
|
||||
UI_CONFIG_VARIABLE (bool, snap_to_region_end, "snap-to-region-end", true)
|
||||
|
|
Loading…
Reference in New Issue
Block a user