Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/Song.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ private slots:

void updateFramesPerTick();


public:
void setPlayPos( tick_t ticks, PlayMode playMode );

private:
Song();
Expand All @@ -434,7 +435,6 @@ private slots:
getPlayPos(m_playMode).currentFrame();
}

void setPlayPos( tick_t ticks, PlayMode playMode );

void saveControllerStates( QDomDocument & doc, QDomElement & element );
void restoreControllerStates( const QDomElement & element );
Expand Down
18 changes: 18 additions & 0 deletions src/gui/editors/TimeLineWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,24 @@ void TimeLineWidget::mouseMoveEvent( QMouseEvent* event )
switch( m_action )
{
case Action::MovePositionMarker:
// Using both setToTime and setPlayPos are required in this context.
// setToTime sets the time display at the top.
// setPlayPos updated the LFO Controller and probably other stuff as well.
m_pos.setTicks(timeAtCursor.getTicks());
if (!( Engine::getSong()->isPlaying()))
{
//Song::PlayMode::None is used when nothing is being played.
Engine::getSong()->setToTime(timeAtCursor, Song::PlayMode::None);
Engine::getSong()->setPlayPos(timeAtCursor.getTicks(), Song::PlayMode::None);
} else {
Engine::getSong()->setToTime(timeAtCursor, m_mode);
Engine::getSong()->setPlayPos(timeAtCursor.getTicks(), m_mode);
}
m_pos.setCurrentFrame( 0 );
m_pos.setJumped( true );
updatePosition();
break;

m_pos.setTicks(timeAtCursor.getTicks());
Engine::getSong()->setToTime(timeAtCursor, m_mode);
if (!( Engine::getSong()->isPlaying()))
Expand Down