editor: add additional parameter to ::snap_to_with_modifier()
Allows passing ensure_snap value through to ::snap_to_internal
This commit is contained in:
parent
c578695a64
commit
3b9c63fbac
|
@ -2749,7 +2749,7 @@ Editor::set_snapped_cursor_position (timepos_t const & pos)
|
||||||
* @param event Event to get current key modifier information from, or 0.
|
* @param event Event to get current key modifier information from, or 0.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
Editor::snap_to_with_modifier (timepos_t& start, GdkEvent const * event, Temporal::RoundMode direction, SnapPref pref)
|
Editor::snap_to_with_modifier (timepos_t& start, GdkEvent const * event, Temporal::RoundMode direction, SnapPref pref, bool ensure_snap)
|
||||||
{
|
{
|
||||||
if (!_session || !event) {
|
if (!_session || !event) {
|
||||||
return;
|
return;
|
||||||
|
@ -2757,7 +2757,7 @@ Editor::snap_to_with_modifier (timepos_t& start, GdkEvent const * event, Tempora
|
||||||
|
|
||||||
if (ArdourKeyboard::indicates_snap (event->button.state)) {
|
if (ArdourKeyboard::indicates_snap (event->button.state)) {
|
||||||
if (_snap_mode == SnapOff) {
|
if (_snap_mode == SnapOff) {
|
||||||
snap_to_internal (start, direction, pref);
|
snap_to_internal (start, direction, pref, ensure_snap);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -2765,7 +2765,7 @@ Editor::snap_to_with_modifier (timepos_t& start, GdkEvent const * event, Tempora
|
||||||
snap_to_internal (start, direction, pref);
|
snap_to_internal (start, direction, pref);
|
||||||
} else if (ArdourKeyboard::indicates_snap_delta (event->button.state)) {
|
} else if (ArdourKeyboard::indicates_snap_delta (event->button.state)) {
|
||||||
/* SnapOff, but we pressed the snap_delta modifier */
|
/* SnapOff, but we pressed the snap_delta modifier */
|
||||||
snap_to_internal (start, direction, pref);
|
snap_to_internal (start, direction, pref, ensure_snap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -500,7 +500,9 @@ public:
|
||||||
void snap_to_with_modifier (Temporal::timepos_t & first,
|
void snap_to_with_modifier (Temporal::timepos_t & first,
|
||||||
GdkEvent const* ev,
|
GdkEvent const* ev,
|
||||||
Temporal::RoundMode direction = Temporal::RoundNearest,
|
Temporal::RoundMode direction = Temporal::RoundNearest,
|
||||||
ARDOUR::SnapPref gpref = ARDOUR::SnapToAny_Visual);
|
ARDOUR::SnapPref gpref = ARDOUR::SnapToAny_Visual,
|
||||||
|
bool ensure_snap = false);
|
||||||
|
|
||||||
Temporal::timepos_t snap_to_bbt (Temporal::timepos_t const & start,
|
Temporal::timepos_t snap_to_bbt (Temporal::timepos_t const & start,
|
||||||
Temporal::RoundMode direction,
|
Temporal::RoundMode direction,
|
||||||
ARDOUR::SnapPref gpref);
|
ARDOUR::SnapPref gpref);
|
||||||
|
|
|
@ -555,7 +555,8 @@ public:
|
||||||
virtual void snap_to_with_modifier (Temporal::timepos_t & first,
|
virtual void snap_to_with_modifier (Temporal::timepos_t & first,
|
||||||
GdkEvent const* ev,
|
GdkEvent const* ev,
|
||||||
Temporal::RoundMode direction = Temporal::RoundNearest,
|
Temporal::RoundMode direction = Temporal::RoundNearest,
|
||||||
ARDOUR::SnapPref gpref = ARDOUR::SnapToAny_Visual) = 0;
|
ARDOUR::SnapPref gpref = ARDOUR::SnapToAny_Visual,
|
||||||
|
bool ensure_snap = false) = 0;
|
||||||
virtual Temporal::timepos_t snap_to_bbt (Temporal::timepos_t const & pos, Temporal::RoundMode, ARDOUR::SnapPref) = 0;
|
virtual Temporal::timepos_t snap_to_bbt (Temporal::timepos_t const & pos, Temporal::RoundMode, ARDOUR::SnapPref) = 0;
|
||||||
|
|
||||||
virtual void set_snapped_cursor_position (Temporal::timepos_t const & pos) = 0;
|
virtual void set_snapped_cursor_position (Temporal::timepos_t const & pos) = 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user