forked from qt-creator/qt-creator
MarkdownEditor: Ensure focus is inside the editor part
When loading a file it is more likely that the editable view of the document should be focused than the read only part. Change-Id: I8b7ed40a233dedf94883072be7462ebeabb78b42 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -245,6 +245,8 @@ public:
|
||||
if (obj == m_widget && ev->type() == QEvent::FocusIn) {
|
||||
if (m_splitter->focusWidget())
|
||||
m_splitter->focusWidget()->setFocus();
|
||||
else if (m_textEditorWidget->isVisible())
|
||||
m_textEditorWidget->setFocus();
|
||||
else
|
||||
m_splitter->widget(0)->setFocus();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user