@@ -130,6 +130,7 @@ Showable {
130130 UbuntuNumberAnimation {
131131 onRunningChanged: {
132132 if (!running && dashContent.x == 0) {
133+ console.log("close scope", scopeItem.scope)
133134 scopeItem.scopeThatOpenedScope.closeScope(scopeItem.scope);
134135 scopeItem.scope = null;
135136 }
@@ -209,6 +210,7 @@ Showable {
209210 objectName: "dashTempScopeItem"
210211
211212 property var scopeThatOpenedScope: null
213+ property var oldScope: null
212214
213215 x: dashContent.x + width
214216 y: dashContent.y
@@ -222,6 +224,25 @@ Showable {
222224 closePreview();
223225 }
224226
227+ Timer {
228+ id: timer
229+ interval: 1000
230+ onTriggered: scopeItem.closeScope()
231+ }
232+
233+ onScopeChanged: {
234+ console.log("scope changed", scope)
235+ timer.start()
236+ }
237+
238+ function closeScope() {
239+ if (oldScope) {
240+ console.log("closing scope, oldscope - current scope", oldScope, scopeItem.scope)
241+ oldScope.closeScope(oldScope);
242+ oldScope = null;
243+ }
244+ }
245+
225246 Connections {
226247 target: scopeItem.scope
227248 onGotoScope: {
@@ -229,7 +250,8 @@ Showable {
229250 }
230251 onOpenScope: {
231252 scopeItem.closePreview();
232− dashContent.openScope(scope);
253+ scopeItem.oldScope = scopeItem.scope;
254+ scopeItem.scope = scope;
233255 }
234256 }
235257 }