Better ghost notes context menu handling.
This commit is contained in:
committed by
Oskar Wallgren
parent
9981b760e4
commit
3d17200925
@@ -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" ),
|
||||
|
||||
Reference in New Issue
Block a user