Give focus to AutomationEditor when the window gets the foucs (#5170)
This will make shortcuts work on opening the editor.
This commit is contained in:
committed by
Hyunjin Song
parent
867639929a
commit
5132d91bfc
@@ -297,6 +297,9 @@ public slots:
|
||||
signals:
|
||||
void currentPatternChanged();
|
||||
|
||||
protected:
|
||||
virtual void focusInEvent(QFocusEvent * event);
|
||||
|
||||
protected slots:
|
||||
void play();
|
||||
void stop();
|
||||
|
||||
@@ -198,6 +198,8 @@ AutomationEditor::AutomationEditor() :
|
||||
setCurrentPattern( NULL );
|
||||
|
||||
setMouseTracking( true );
|
||||
setFocusPolicy( Qt::StrongFocus );
|
||||
setFocus();
|
||||
}
|
||||
|
||||
|
||||
@@ -2516,6 +2518,11 @@ void AutomationEditorWindow::clearCurrentPattern()
|
||||
setCurrentPattern(nullptr);
|
||||
}
|
||||
|
||||
void AutomationEditorWindow::focusInEvent(QFocusEvent * event)
|
||||
{
|
||||
m_editor->setFocus( event->reason() );
|
||||
}
|
||||
|
||||
void AutomationEditorWindow::play()
|
||||
{
|
||||
m_editor->play();
|
||||
|
||||
Reference in New Issue
Block a user