Fix lost control links in copied automation patterns (#4723)
This hack should be removed once the automation system gets fixed.
This commit is contained in:
@@ -77,6 +77,7 @@ public:
|
||||
}
|
||||
|
||||
static jo_id_t idToSave( jo_id_t id );
|
||||
static jo_id_t idFromSave( jo_id_t id );
|
||||
|
||||
void clearJournal();
|
||||
void stopAllJournalling();
|
||||
|
||||
@@ -787,6 +787,16 @@ void AutomationPattern::resolveAllIDs()
|
||||
{
|
||||
a->addObject( dynamic_cast<AutomatableModel *>( 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<AutomatableModel *>( o ) )
|
||||
{
|
||||
a->addObject( dynamic_cast<AutomatableModel *>( o ), false );
|
||||
}
|
||||
}
|
||||
}
|
||||
a->m_idsToResolve.clear();
|
||||
a->dataChanged();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user