Added mouse button logic to marker entry fields for Qt GUI.

This commit is contained in:
mjbudd77 2021-12-02 22:51:59 -05:00
parent 01d87a6576
commit 802019e879
4 changed files with 35 additions and 0 deletions

View File

@ -705,3 +705,19 @@ void UpperMarkerNoteEdit::keyPressEvent(QKeyEvent *event)
}
}
// -------------------------------------------------------------------------
void UpperMarkerNoteEdit::mousePressEvent(QMouseEvent * event)
{
if ( event->button() == Qt::MiddleButton )
{
playback->handleMiddleButtonClick();
}
else if ( (event->button() == Qt::LeftButton) || (event->button() == Qt::RightButton) )
{
// scroll to the Marker
if (taseditorConfig->followMarkerNoteContext)
{
tasWin->pianoRoll->followMarker(playback->displayedMarkerNumber);
}
}
}
// -------------------------------------------------------------------------

View File

@ -22,6 +22,7 @@ class UpperMarkerNoteEdit : public QLineEdit
void focusInEvent(QFocusEvent *event);
void focusOutEvent(QFocusEvent *event);
void keyPressEvent(QKeyEvent *event);
void mousePressEvent(QMouseEvent * event);
};
class PLAYBACK

View File

@ -985,3 +985,20 @@ void LowerMarkerNoteEdit::keyPressEvent(QKeyEvent *event)
}
}
// -------------------------------------------------------------------------
void LowerMarkerNoteEdit::mousePressEvent(QMouseEvent * event)
{
if ( event->button() == Qt::MiddleButton )
{
playback->handleMiddleButtonClick();
}
else if ( (event->button() == Qt::LeftButton) || (event->button() == Qt::RightButton) )
{
// scroll to the Marker
if (taseditorConfig->followMarkerNoteContext)
{
tasWin->pianoRoll->followMarker(selection->displayedMarkerNumber);
}
}
}
// -------------------------------------------------------------------------

View File

@ -23,6 +23,7 @@ class LowerMarkerNoteEdit : public QLineEdit
void focusInEvent(QFocusEvent *event);
void focusOutEvent(QFocusEvent *event);
void keyPressEvent(QKeyEvent *event);
void mousePressEvent(QMouseEvent * event);
};
class SELECTION