diff --git a/include/ProjectJournal.h b/include/ProjectJournal.h index a89c9725a2d..e0e738b707c 100644 --- a/include/ProjectJournal.h +++ b/include/ProjectJournal.h @@ -77,6 +77,7 @@ class ProjectJournal } static jo_id_t idToSave( jo_id_t id ); + static jo_id_t idFromSave( jo_id_t id ); void clearJournal(); void stopAllJournalling(); diff --git a/src/core/AutomationPattern.cpp b/src/core/AutomationPattern.cpp index 25da6defbdf..2ee41b5f269 100644 --- a/src/core/AutomationPattern.cpp +++ b/src/core/AutomationPattern.cpp @@ -787,6 +787,16 @@ void AutomationPattern::resolveAllIDs() { a->addObject( dynamic_cast( o ), false ); } + else + { + // FIXME: Remove this block once the automation system gets fixed + // This is a temporary fix for https://github.com/LMMS/lmms/issues/3781 + o = Engine::projectJournal()->journallingObject(ProjectJournal::idFromSave(*k)); + if( o && dynamic_cast( o ) ) + { + a->addObject( dynamic_cast( o ), false ); + } + } } a->m_idsToResolve.clear(); a->dataChanged(); diff --git a/src/core/ProjectJournal.cpp b/src/core/ProjectJournal.cpp index 57646aeaa79..ce811dbc595 100644 --- a/src/core/ProjectJournal.cpp +++ b/src/core/ProjectJournal.cpp @@ -164,6 +164,11 @@ jo_id_t ProjectJournal::idToSave( jo_id_t id ) return id & ~EO_ID_MSB; } +jo_id_t ProjectJournal::idFromSave( jo_id_t id ) +{ + return id | EO_ID_MSB; +} +