OSDN Git Service

QML JS Debugger: clear context properly when reloading qml app
authorLasse Holmstedt <lasse.holmstedt@nokia.com>
Fri, 30 Jul 2010 15:25:14 +0000 (17:25 +0200)
committerLasse Holmstedt <lasse.holmstedt@nokia.com>
Fri, 30 Jul 2010 15:45:28 +0000 (17:45 +0200)
src/libs/qmljsdebugger/qdeclarativedesignview.cpp

index 29f6a1a..d7270c4 100644 (file)
@@ -591,8 +591,11 @@ void QDeclarativeDesignViewPrivate::_q_onStatusChanged(QDeclarativeView::Status
 {
     if (status == QDeclarativeView::Ready) {
         if (q->rootObject()) {
+            if (data->subcomponentEditorTool->contextIndex() != -1)
+                data->subcomponentEditorTool->clear();
             subcomponentEditorTool->pushContext(q->rootObject());
             emit q->executionStarted(1.0f);
+
         }
         qmlDesignDebugServer()->reloaded();
     }