Skip to content
Prev Previous commit
Next Next commit
* Don’t show Set as ghost in piano-roll on empty pattern.
* Small change to comply more with the rest of the coding style.
  • Loading branch information
CYBERDEViLNL authored and CYBERDEViLNL committed Jan 6, 2019
commit 4e5493f23d738848a61622273d0ab53f8017fda6
9 changes: 7 additions & 2 deletions src/tracks/Pattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -677,14 +677,19 @@ void PatternView::constructContextMenu( QMenu * _cm )
connect( a, SIGNAL( triggered( bool ) ),
this, SLOT( openInPianoRoll() ) );

if( gui->pianoRoll()->currentPattern() && gui->pianoRoll()->currentPattern() != m_pat ){
if( gui->pianoRoll()->currentPattern() &&
gui->pianoRoll()->currentPattern() != m_pat &&
not m_pat->empty() )
{
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 {
}
else
{
_cm->insertSeparator( _cm->actions()[1] );
}

Expand Down