Sequencer - Fixed point deletion button

This commit is contained in:
Emmanuel BENOîT 2017-11-30 14:09:40 +01:00
parent 99d9e5c7eb
commit daf885cd20

View file

@ -2276,17 +2276,13 @@ void T_SyncViewImpl_::displayPointWindow( ) noexcept
} }
const bool canUseButtons{ !changed && selUpdate == E_ChangeType::NONE }; const bool canUseButtons{ !changed && selUpdate == E_ChangeType::NONE };
if ( canDelete ) { if ( canDelete || canInsertAfter || canInsertBefore ) {
SameLine( 110 ); Separator( );
if ( Button( "Delete point" , ImVec2{ -1 , 0 } ) && canUseButtons ) { if ( canDelete && Button( "Delete point" , ImVec2{ -1 , 0 } ) && canUseButtons ) {
SyncEditor::DeletePoint( *selId , sid , pid ); SyncEditor::DeletePoint( *selId , sid , pid );
selPoint.clear( ); selPoint.clear( );
sub = SW_SEGMENT; sub = SW_SEGMENT;
} }
}
if ( canInsertAfter || canInsertBefore ) {
Separator( );
if ( canInsertBefore ) { if ( canInsertBefore ) {
if ( Button( "Insert before" , ImVec2{ -1 , 0 } ) && canUseButtons ) { if ( Button( "Insert before" , ImVec2{ -1 , 0 } ) && canUseButtons ) {
SyncEditor::InsertPoint( *selId , sid , pid ); SyncEditor::InsertPoint( *selId , sid , pid );