Merge pull request #1978 from Wallacoloo/pianorollfocus

Give focus to the PianoRoll widget when its window is opened
This commit is contained in:
Tres Finocchiaro committed 2015-04-19 15:06:27 +00:00
commit d61075972d
2 files changed
+8

No files matched your search

+2
View File
@@ -384,6 +384,8 @@ signals:
void currentPatternChanged();
private:
void focusInEvent(QFocusEvent * event);
PianoRoll* m_editor;
ComboBox * m_zoomingComboBox;
+6
View File
@@ -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());
}