diff --git a/src/plugins/qmldesigner/qmlcontextpane.cpp b/src/plugins/qmldesigner/qmlcontextpane.cpp
index c83653e598dc76fae270f54bbeabb430d22857f3..f97073116d230d5420a23d4a2e2c4f201b9e42e3 100644
--- a/src/plugins/qmldesigner/qmlcontextpane.cpp
+++ b/src/plugins/qmldesigner/qmlcontextpane.cpp
@@ -77,6 +77,8 @@ void QmlContextPane::apply(TextEditor::BaseTextEditorEditable *editor, Document:
     if (update && editor != m_editor)
         return; //do not update for different editor
 
+    m_blockWriting = true;
+
     LookupContext::Ptr lookupContext = LookupContext::create(doc, snapshot, QList<Node*>());
     const Interpreter::ObjectValue *scopeObject = doc->bind()->findQmlObject(node);
 
@@ -148,11 +150,8 @@ void QmlContextPane::apply(TextEditor::BaseTextEditorEditable *editor, Document:
                 contextWidget()->activate(p3 , p1, p2);
             else
                 contextWidget()->rePosition(p3 , p1, p2);
-
-            m_blockWriting = true;
             contextWidget()->setPath(doc->path());
-            contextWidget()->setProperties(&propertyReader);
-            m_blockWriting = false;
+            contextWidget()->setProperties(&propertyReader); 
             m_doc = doc;
             m_node = node;
         } else {
@@ -166,6 +165,8 @@ void QmlContextPane::apply(TextEditor::BaseTextEditorEditable *editor, Document:
         contextWidget()->colorDialog()->hide();
     }
 
+    m_blockWriting = false;
+
 }
 
 void QmlContextPane::setProperty(const QString &propertyName, const QVariant &value)