Widgets/Knob: only restore journalling state on release of left mouse button

Do not try to restore the journalling state of the underlying model when
releasing e.g the right mouse button as this causes a crash otherwise.
This commit is contained in:
Tobias Doerffel
2014-01-07 23:49:07 +01:00
parent d0f6eaef3b
commit 1f203a10f9

View File

@@ -488,9 +488,16 @@ void knob::mouseMoveEvent( QMouseEvent * _me )
void knob::mouseReleaseEvent( QMouseEvent * /* _me*/ )
void knob::mouseReleaseEvent( QMouseEvent* event )
{
model()->restoreJournallingState();
if( event && event->button() == Qt::LeftButton )
{
AutomatableModel *thisModel = model();
if( thisModel )
{
thisModel->restoreJournallingState();
}
}
m_buttonPressed = false;