From cbbf373aab32a6c823d92eb0d248a7767fbfb2ea Mon Sep 17 00:00:00 2001 From: maj00r Date: Thu, 22 Oct 2026 17:55:05 +0200 Subject: [PATCH] fix(editor): the templates of the signals swapped or placed without a track changed are a step of the history of their own: they went into the step before, the block signals set say, undone with it, and the SRK tool, missing a new step, kept showing the lights as they were --- application/editormodesignal.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/application/editormodesignal.cpp b/application/editormodesignal.cpp index 7bccb392..81910a3a 100644 --- a/application/editormodesignal.cpp +++ b/application/editormodesignal.cpp @@ -1077,7 +1077,17 @@ std::size_t editor_mode::signal_batch(signal_changes const &Changes, std::vector auto const count{instances.size()}; if (step.tracks.empty() && Created.empty() && instances.empty() && directives.empty()) return 0; - push_track_snapshot(std::move(step.tracks), std::move(Created)); + if (step.tracks.empty() && Created.empty()) + { + EditorSnapshot only; + auto const *file{scene::Layers.instance(directives.empty() ? instances.front() : directives.front().first).file}; + only.node_name = file != nullptr ? *file : std::string{}; + trim_history(); + m_history.push_back(std::move(only)); + g_redo.clear(); + } + else + push_track_snapshot(std::move(step.tracks), std::move(Created)); auto &pushed{m_history.back()}; pushed.instances = std::move(instances); pushed.directives.insert(pushed.directives.end(), directives.begin(), directives.end());