forked from qt-creator/qt-creator
Android manifest editor: Set focus when switching tabs
Change-Id: I4fd52b852d274783f679b056842b87ba886ddf90 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
@@ -554,19 +554,20 @@ bool AndroidManifestEditorWidget::setActivePage(EditorPage page)
|
|||||||
|
|
||||||
if (page == Source) {
|
if (page == Source) {
|
||||||
syncToEditor();
|
syncToEditor();
|
||||||
setFocus();
|
|
||||||
} else {
|
} else {
|
||||||
if (!syncToWidgets())
|
if (!syncToWidgets())
|
||||||
return false;
|
return false;
|
||||||
// TODO?
|
|
||||||
// QWidget *fw = m_overlayWidget->focusWidget();
|
|
||||||
// if (fw && fw != m_overlayWidget)
|
|
||||||
// fw->setFocus();
|
|
||||||
// else
|
|
||||||
// m_packageNameLineEdit->setFocus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setCurrentIndex(page);
|
setCurrentIndex(page);
|
||||||
|
|
||||||
|
QWidget *cw = currentWidget();
|
||||||
|
if (cw) {
|
||||||
|
if (cw->focusWidget())
|
||||||
|
cw->focusWidget()->setFocus();
|
||||||
|
else
|
||||||
|
cw->setFocus();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user