Make loop markers snap to same increments as clips (#6313)

* Make loop markers snap to same increments as clips

* Fix snap size when loop points meet

* Switch to signal-slot based communication for proportional snap changes

* Move end if user clicks at exact center of loop

* Changes from reviews

* More detailed comment

* Properly handle zero length loop when ctrl is held

* More compact selection of action, m_loopPos ordering

* More robust sort
This commit is contained in:
Spekular
2022-04-18 17:25:15 +02:00
committed by GitHub
parent 33b44ec9c7
commit b4317edd43
3 changed files with 22 additions and 25 deletions

View File

@@ -180,6 +180,10 @@ public slots:
{
updatePosition( TimePos() );
}
void setSnapSize( const float snapSize )
{
m_snapSize = snapSize;
}
void toggleAutoScroll( int _n );
void toggleLoopPoints( int _n );
void toggleBehaviourAtStop( int _n );
@@ -217,6 +221,7 @@ private:
int m_xOffset;
int m_posMarkerX;
float m_ppb;
float m_snapSize;
Song::PlayPos & m_pos;
const TimePos & m_begin;
const Song::PlayModes m_mode;