Commit b60df470 authored by Kai Koehne's avatar Kai Koehne
Browse files

Fix crash when adding/removing states in an invalid document

Disable the states editor widget if the qml file is invalid, just
as the other windows are disabled.

Task-number: BAUHAUS-272
parent ed1e6994
......@@ -334,6 +334,7 @@ void DocumentWidget::enable()
qDebug() << Q_FUNC_INFO;
m_warningWidget->setVisible(false);
m_document->documentWidget()->setEnabled(true);
m_document->statesEditorWidget()->setEnabled(true);
m_leftSideBar->setEnabled(true);
m_rightSideBar->setEnabled(true);
m_isDisabled = false;
......@@ -347,6 +348,7 @@ void DocumentWidget::disable(const QList<RewriterView::Error> &errors)
m_warningWidget->setError(errors.first());
m_warningWidget->setVisible(true);
m_document->documentWidget()->setEnabled(false);
m_document->statesEditorWidget()->setEnabled(false);
m_leftSideBar->setEnabled(false);
m_rightSideBar->setEnabled(false);
m_isDisabled = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment