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 };
if ( canDelete ) {
SameLine( 110 );
if ( Button( "Delete point" , ImVec2{ -1 , 0 } ) && canUseButtons ) {
if ( canDelete || canInsertAfter || canInsertBefore ) {
Separator( );
if ( canDelete && Button( "Delete point" , ImVec2{ -1 , 0 } ) && canUseButtons ) {
SyncEditor::DeletePoint( *selId , sid , pid );
selPoint.clear( );
sub = SW_SEGMENT;
}
}
if ( canInsertAfter || canInsertBefore ) {
Separator( );
if ( canInsertBefore ) {
if ( Button( "Insert before" , ImVec2{ -1 , 0 } ) && canUseButtons ) {
SyncEditor::InsertPoint( *selId , sid , pid );