File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed
Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -676,20 +676,13 @@ void PatternView::constructContextMenu( QMenu * _cm )
676676 connect ( a, SIGNAL ( triggered ( bool ) ),
677677 this , SLOT ( openInPianoRoll () ) );
678678
679- if ( gui->pianoRoll ()->currentPattern () && !m_pat->empty () )
680- {
681- QAction * b = new QAction ( embed::getIconPixmap ( " ghost_note" ),
679+ QAction * b = new QAction ( embed::getIconPixmap ( " ghost_note" ),
682680 tr ( " Set as ghost in piano-roll" ), _cm );
683- _cm->insertAction ( _cm->actions ()[1 ], b );
684- connect ( b, SIGNAL ( triggered ( bool ) ),
685- this , SLOT ( setGhostInPianoRoll () ) );
686- _cm->insertSeparator ( _cm->actions ()[2 ] );
687- }
688- else
689- {
690- _cm->insertSeparator ( _cm->actions ()[1 ] );
691- }
692-
681+ if ( m_pat->empty () ) { b->setEnabled ( false ); }
682+ _cm->insertAction ( _cm->actions ()[1 ], b );
683+ connect ( b, SIGNAL ( triggered ( bool ) ),
684+ this , SLOT ( setGhostInPianoRoll () ) );
685+ _cm->insertSeparator ( _cm->actions ()[2 ] );
693686 _cm->addSeparator ();
694687
695688 _cm->addAction ( embed::getIconPixmap ( " edit_erase" ),
You can’t perform that action at this time.
0 commit comments