Give focus to the PianoRoll widget when its window is opened
This commit is contained in:
@@ -384,6 +384,8 @@ signals:
|
||||
void currentPatternChanged();
|
||||
|
||||
private:
|
||||
void focusInEvent(QFocusEvent * event);
|
||||
|
||||
PianoRoll* m_editor;
|
||||
|
||||
ComboBox * m_zoomingComboBox;
|
||||
|
||||
@@ -4236,3 +4236,9 @@ QSize PianoRollWindow::sizeHint() const
|
||||
{
|
||||
return {m_toolBar->sizeHint().width() + 10, INITIAL_PIANOROLL_HEIGHT};
|
||||
}
|
||||
|
||||
void PianoRollWindow::focusInEvent(QFocusEvent * event)
|
||||
{
|
||||
// when the window is given focus, also give focus to the actual piano roll
|
||||
m_editor->setFocus(event->reason());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user