diff --git a/include/JournallingObject.h b/include/JournallingObject.h index 3f6e47a82..b9ada746e 100644 --- a/include/JournallingObject.h +++ b/include/JournallingObject.h @@ -77,6 +77,9 @@ public: return oldJournalling; } + inline bool isEmpty() { + return m_journallingStateStack.isEmpty(); + } protected: void changeID( jo_id_t _id ); diff --git a/src/gui/widgets/knob.cpp b/src/gui/widgets/knob.cpp index 7bb226795..dabd9cc49 100644 --- a/src/gui/widgets/knob.cpp +++ b/src/gui/widgets/knob.cpp @@ -592,7 +592,9 @@ void knob::mouseReleaseEvent( QMouseEvent* event ) AutomatableModel *thisModel = model(); if( thisModel ) { - thisModel->restoreJournallingState(); + if(!thisModel->isEmpty()) { + thisModel->restoreJournallingState(); + } } }