Sequencer - Fixed track selection
Overrides / single inputs were not preventing each other from being added anymore.
This commit is contained in:
parent
57c5b6569c
commit
9a15267749
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue