Sequencer - Remember open track selection tab

This commit is contained in:
Emmanuel BENOîT 2017-11-30 09:35:47 +01:00
parent 2c7fd87c48
commit be4bbe4095

View file

@ -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