Prevent action on source after locking it from side panel

This commit is contained in:
brunoherbelin
2021-03-17 22:20:49 +01:00
parent 6d2112fcd9
commit ea211cb8ab

View File

@@ -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();