forked from qt-creator/qt-creator
QmlDesigner: Fix form editor occasionally failing to load content
It seems that form editor widget gets enabled when design mode is opened, whether or not the form view is enabled. Therefore we need to check the view's enable state in FormEditorWidget::showEvent rather than widget's state to make the form editor content setup properly. Change-Id: Ie865b98bb4c9f884f9297fe32fbf7ee02455e74e Fixes: QDS-2926 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -529,7 +529,7 @@ void FormEditorWidget::showEvent(QShowEvent *event)
|
|||||||
{
|
{
|
||||||
QWidget::showEvent(event);
|
QWidget::showEvent(event);
|
||||||
|
|
||||||
const bool wasEnabled = isEnabled();
|
const bool wasEnabled = m_formEditorView->isEnabled();
|
||||||
m_formEditorView->setEnabled(true);
|
m_formEditorView->setEnabled(true);
|
||||||
|
|
||||||
if (!wasEnabled && m_formEditorView->model()) {
|
if (!wasEnabled && m_formEditorView->model()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user