Commit 0b11ba31 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner: Keep result in local variable

Change-Id: I43c99bb18c1473b67fc40cda02af6cb1595c29ec
Reviewed-by: default avatarhjk <hjk@qt.io>
parent 50a07695
......@@ -107,23 +107,23 @@ void ViewManager::attachNodeInstanceView()
void ViewManager::attachRewriterView()
{
if (currentDesignDocument()->rewriterView()) {
currentDesignDocument()->rewriterView()->setWidgetStatusCallback([this](bool enable) {
if (RewriterView *view = currentDesignDocument()->rewriterView()) {
view->setWidgetStatusCallback([this](bool enable) {
if (enable)
enableWidgets();
else
disableWidgets();
});
currentModel()->setRewriterView(currentDesignDocument()->rewriterView());
currentDesignDocument()->rewriterView()->reactivateTextMofifierChangeSignals();
currentModel()->setRewriterView(view);
view->reactivateTextMofifierChangeSignals();
}
}
void ViewManager::detachRewriterView()
{
if (currentDesignDocument()->rewriterView()) {
currentDesignDocument()->rewriterView()->deactivateTextMofifierChangeSignals();
if (RewriterView *view = currentDesignDocument()->rewriterView()) {
view->deactivateTextMofifierChangeSignals();
currentModel()->setRewriterView(0);
}
}
......
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