From 9a15267749019640e3ca69b2026d56ca2f3979c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Wed, 29 Nov 2017 07:23:36 +0100 Subject: [PATCH] Sequencer - Fixed track selection Overrides / single inputs were not preventing each other from being added anymore. --- ui-sequencer.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ui-sequencer.cc b/ui-sequencer.cc index 2d55c52..11e191f 100644 --- a/ui-sequencer.cc +++ b/ui-sequencer.cc @@ -1329,9 +1329,7 @@ void T_SyncViewImpl_::displayInputSelector( ) noexcept // The list ImGui::BeginChild( "content" ); for ( auto const& n : names ) { - const T_SyncTrackId id{ n , false }; - const bool present{ sTracks.contains( id ) }; - assert( !present || sInputs.contains( n ) ); + const bool present{ sInputs.contains( n ) }; const bool overriden{ present && *sInputs.get( n ) }; if ( overriden ) { @@ -1341,6 +1339,7 @@ void T_SyncViewImpl_::displayInputSelector( ) noexcept bool select{ present }; stringBuffer.clear( ) << n << '\0'; if ( Checkbox( stringBuffer.data( ) , &select ) ) { + const T_SyncTrackId id{ n , false }; if ( select ) { sTracks.add( id ); sInputs.add( n , false ); @@ -1459,7 +1458,7 @@ bool T_SyncViewImpl_::areOverrideInputsDisplayed( { auto const& in{ ov.inputNames( ) }; for ( auto i = 0u ; i < in.size( ) ; i ++ ) { - if ( sTracks.contains( T_SyncTrackId{ in[ i ] , false } ) ) { + if ( sInputs.contains( in[ i ] ) ) { return true; } }