From ea211cb8ab2cfc977ee1c76325a89af3ada80d03 Mon Sep 17 00:00:00 2001 From: brunoherbelin Date: Wed, 17 Mar 2021 22:20:49 +0100 Subject: [PATCH] Prevent action on source after locking it from side panel --- ImGuiVisitor.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ImGuiVisitor.cpp b/ImGuiVisitor.cpp index 3dae0ad..1cd9a41 100644 --- a/ImGuiVisitor.cpp +++ b/ImGuiVisitor.cpp @@ -441,8 +441,13 @@ void ImGuiVisitor::visit (Source& s) ImGui::SetCursorPos( ImVec2(preview_width + 20, pos.y + 2.f * ImGui::GetFrameHeightWithSpacing()) ); const char *tooltip[2] = {"Unlocked", "Locked"}; bool l = s.locked(); - if (ImGuiToolkit::IconToggle(15,6,17,6, &l, tooltip ) ) + if (ImGuiToolkit::IconToggle(15,6,17,6, &l, tooltip ) ) { s.setLocked(l); + if (l) + Mixer::selection().clear(); + else + Mixer::selection().set(&s); + } // toggle enable/disable image processing bool on = s.imageProcessingEnabled();