From be4bbe4095848b320113d99db70af1ffbd85c221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Thu, 30 Nov 2017 09:35:47 +0100 Subject: [PATCH] Sequencer - Remember open track selection tab --- ui-sequencer.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ui-sequencer.cc b/ui-sequencer.cc index e99af41..75efaaf 100644 --- a/ui-sequencer.cc +++ b/ui-sequencer.cc @@ -445,6 +445,7 @@ struct T_SyncViewImpl_ // Sub-windows E_SubWindow sub{ SW_NONE }; + E_SubWindow tsSelectedTab{ SW_OVERRIDE_SELECTOR }; // Track selection T_KeyValueTable< T_String , bool > sInputs; @@ -683,7 +684,7 @@ void T_SyncViewImpl_::displayToolbar( ) noexcept "Select inputs or sets thereof to display & edit." ) ) { const bool displaySelector{ sub == SW_INPUT_SELECTOR || sub == SW_OVERRIDE_SELECTOR }; - sub = displaySelector ? SW_NONE : SW_INPUT_SELECTOR; + sub = displaySelector ? SW_NONE : tsSelectedTab; curveFinder = T_String{}; } } @@ -1473,12 +1474,12 @@ void T_SyncViewImpl_::displayTrackSelectorWindow( ) noexcept const float buttonWidth{ std::max( 50.f , ( innerWidth - nButtons * style.FramePadding.x ) / nButtons ) }; - if ( FakeTab_( "Individual inputs" , sub == SW_INPUT_SELECTOR , buttonWidth ) ) { - sub = SW_INPUT_SELECTOR; + if ( FakeTab_( "Overrides" , sub == SW_OVERRIDE_SELECTOR , buttonWidth ) ) { + sub = tsSelectedTab = SW_OVERRIDE_SELECTOR; } SameLine( 0 ); - if ( FakeTab_( "Overrides" , sub == SW_OVERRIDE_SELECTOR , buttonWidth ) ) { - sub = SW_OVERRIDE_SELECTOR; + if ( FakeTab_( "Individual inputs" , sub == SW_INPUT_SELECTOR , buttonWidth ) ) { + sub = tsSelectedTab = SW_INPUT_SELECTOR; } // Content