From a92b45ae2650f7ddf319c1379a759d25ecd77a68 Mon Sep 17 00:00:00 2001 From: Bruno Herbelin Date: Thu, 6 Jan 2022 22:04:05 +0100 Subject: [PATCH] Select Linked MixingGroup on double clic & a bug fix --- UserInterfaceManager.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/UserInterfaceManager.cpp b/UserInterfaceManager.cpp index f0b073a..eb8c0c4 100644 --- a/UserInterfaceManager.cpp +++ b/UserInterfaceManager.cpp @@ -69,6 +69,7 @@ using namespace std; #include "Settings.h" #include "SessionCreator.h" #include "Mixer.h" +#include "MixingGroup.h" #include "Recorder.h" #include "Streamer.h" #include "Loopback.h" @@ -387,13 +388,13 @@ void UserInterface::handleKeyboard() Mixer::manager().deleteSelection(); // button tab to select next else if ( !alt_modifier_active && ImGui::IsKeyPressed( GLFW_KEY_TAB )) { + // cancel selection + if (!Mixer::selection().empty()) + Mixer::selection().clear(); if (shift_modifier_active) Mixer::manager().setCurrentPrevious(); else Mixer::manager().setCurrentNext(); - // cancel selection - if (!Mixer::selection().empty()) - Mixer::selection().clear(); } // arrow keys to act on current view else if (ImGui::IsKeyDown( GLFW_KEY_LEFT )) @@ -564,6 +565,12 @@ void UserInterface::handleMouse() // discard current to select front most source // (because single clic maintains same source active) Mixer::manager().unsetCurrentSource(); + else { + MixingGroup *g = Mixer::manager().currentSource()->mixingGroup(); + if (g != nullptr){ + Mixer::selection().set( g->getCopy() ); + } + } // display source in left pannel navigator.showPannelSource( Mixer::manager().indexCurrentSource() ); }