From 76d8f65485e4c18617bd3411b8c91536eb9efda3 Mon Sep 17 00:00:00 2001 From: szeli1 <143485814+szeli1@users.noreply.github.com> Date: Sun, 19 May 2024 23:03:07 +0200 Subject: [PATCH] Fix lost connections when restoring automation clip (#7002) --- src/core/ProjectJournal.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/ProjectJournal.cpp b/src/core/ProjectJournal.cpp index fc77c98e6..ae17b2aa8 100644 --- a/src/core/ProjectJournal.cpp +++ b/src/core/ProjectJournal.cpp @@ -23,11 +23,13 @@ */ #include +#include #include "ProjectJournal.h" #include "Engine.h" #include "JournallingObject.h" #include "Song.h" +#include "AutomationClip.h" namespace lmms { @@ -67,6 +69,12 @@ void ProjectJournal::undo() jo->restoreState( c.data.content().firstChildElement() ); setJournalling( prev ); Engine::getSong()->setModified(); + + // loading AutomationClip connections correctly + if (!c.data.content().elementsByTagName("automationclip").isEmpty()) + { + AutomationClip::resolveAllIDs(); + } break; } }