diff --git a/src/plugins/qmljseditor/qmljseditor.cpp b/src/plugins/qmljseditor/qmljseditor.cpp
index 690464cb6003eebddee271703b7ed6100de0ffac..411d854c1e9992f0f61427693325f3bf9b2d0174 100644
--- a/src/plugins/qmljseditor/qmljseditor.cpp
+++ b/src/plugins/qmljseditor/qmljseditor.cpp
@@ -856,6 +856,10 @@ void QmlJSTextEditor::updateOutlineNow()
     }
 
     m_outlineModel->update(document, snapshot);
+
+    QTreeView *treeView = static_cast<QTreeView*>(m_outlineCombo->view());
+    treeView->expandAll();
+
     updateOutlineIndexNow();
 }
 
@@ -1401,9 +1405,6 @@ void QmlJSTextEditor::updateSemanticInfo(const SemanticInfo &semanticInfo)
         FindDeclarations findDeclarations;
         m_semanticInfo.declarations = findDeclarations(doc->ast());
 
-        QTreeView *treeView = static_cast<QTreeView*>(m_outlineCombo->view());
-        treeView->expandAll();
-
         if (m_contextPane) {
             Node *newNode = m_semanticInfo.declaringMember(position());
             if (newNode) {
diff --git a/src/plugins/qmljseditor/qmljsoutline.cpp b/src/plugins/qmljseditor/qmljsoutline.cpp
index ee3b5bb4fdf6ce672c87a4187e378c48fea90423..4c018a5b6ede49d868eeb57ebe465efd45952a2f 100644
--- a/src/plugins/qmljseditor/qmljsoutline.cpp
+++ b/src/plugins/qmljseditor/qmljsoutline.cpp
@@ -49,6 +49,8 @@ void QmlJSOutlineWidget::setEditor(QmlJSTextEditor *editor)
     m_editor = editor;
 
     m_treeView->setModel(m_editor.data()->outlineModel());
+    modelUpdated();
+
     connect(m_treeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
             this, SLOT(updateSelectionInText(QItemSelection)));