Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/PianoRoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ protected slots:

QList<int> m_markedSemiTones;
QMenu * m_semiToneMarkerMenu; // when you right click on the key area
int m_pianoKeySelected;

PianoRoll();
PianoRoll( const PianoRoll & );
Expand Down
3 changes: 2 additions & 1 deletion src/gui/editors/PianoRoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ void PianoRoll::changeNoteEditMode( int i )

void PianoRoll::markSemiTone( int i )
{
const int key = getKey( mapFromGlobal( m_semiToneMarkerMenu->pos() ).y() );
const int key = m_pianoKeySelected;
const InstrumentFunctionNoteStacking::Chord * chord = nullptr;

switch( static_cast<SemiToneMarkerAction>( i ) )
Expand Down Expand Up @@ -1704,6 +1704,7 @@ void PianoRoll::mousePressEvent(QMouseEvent * me )
if( me->buttons() == Qt::RightButton )
{
// right click, tone marker contextual menu
m_pianoKeySelected = getKey( me->y() );
m_semiToneMarkerMenu->popup( mapToGlobal( QPoint( me->x(), me->y() ) ) );
}
else
Expand Down