Skip to content

Commit

Permalink
Turn journalling off when moving fader (LMMS#4147)
Browse files Browse the repository at this point in the history
  • Loading branch information
zonkmachine committed Mar 1, 2018
1 parent a8e8746 commit 063a505
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/gui/widgets/Fader.cpp
Expand Up @@ -188,6 +188,13 @@ void Fader::mousePressEvent( QMouseEvent* mouseEvent )
if( mouseEvent->button() == Qt::LeftButton &&
! ( mouseEvent->modifiers() & Qt::ControlModifier ) )
{
AutomatableModel *thisModel = model();
if( thisModel )
{
thisModel->addJournalCheckPoint();
thisModel->saveJournallingState( false );
}

if( mouseEvent->y() >= knobPosY() - ( *m_knob ).height() && mouseEvent->y() < knobPosY() )
{
updateTextFloat();
Expand Down Expand Up @@ -245,8 +252,17 @@ void Fader::mouseDoubleClickEvent( QMouseEvent* mouseEvent )



void Fader::mouseReleaseEvent( QMouseEvent * _me )
void Fader::mouseReleaseEvent( QMouseEvent * mouseEvent )
{
if( mouseEvent && mouseEvent->button() == Qt::LeftButton )
{
AutomatableModel *thisModel = model();
if( thisModel )
{
thisModel->restoreJournallingState();
}
}

s_textFloat->hide();
}

Expand Down

0 comments on commit 063a505

Please sign in to comment.