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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user