Better ghost notes context menu handling.

This commit is contained in:
CYBERDEViLNL
2019-02-06 16:00:33 +01:00
committed by Oskar Wallgren
parent 9981b760e4
commit 3d17200925

View File

@@ -676,20 +676,13 @@ void PatternView::constructContextMenu( QMenu * _cm )
connect( a, SIGNAL( triggered( bool ) ),
this, SLOT( openInPianoRoll() ) );
if( gui->pianoRoll()->currentPattern() && !m_pat->empty() )
{
QAction * b = new QAction( embed::getIconPixmap( "ghost_note" ),
QAction * b = new QAction( embed::getIconPixmap( "ghost_note" ),
tr( "Set as ghost in piano-roll" ), _cm );
_cm->insertAction( _cm->actions()[1], b );
connect( b, SIGNAL( triggered( bool ) ),
this, SLOT( setGhostInPianoRoll() ) );
_cm->insertSeparator( _cm->actions()[2] );
}
else
{
_cm->insertSeparator( _cm->actions()[1] );
}
if( m_pat->empty() ) { b->setEnabled( false ); }
_cm->insertAction( _cm->actions()[1], b );
connect( b, SIGNAL( triggered( bool ) ),
this, SLOT( setGhostInPianoRoll() ) );
_cm->insertSeparator( _cm->actions()[2] );
_cm->addSeparator();
_cm->addAction( embed::getIconPixmap( "edit_erase" ),