Added mouse button logic to marker entry fields for Qt GUI.
This commit is contained in:
parent
01d87a6576
commit
802019e879
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue