From b8ecf31adb0540703d2efe2657fcbb220a0c4156 Mon Sep 17 00:00:00 2001 From: Cory Chaplin Date: Wed, 16 Jul 2014 21:19:34 +0200 Subject: [PATCH] Better detection for last open panel --- client/src/views/application.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/src/views/application.js b/client/src/views/application.js index fe9ef3c..dd68619 100644 --- a/client/src/views/application.js +++ b/client/src/views/application.js @@ -383,13 +383,10 @@ _kiwi.view.Application = Backbone.View.extend({ panel_access.shift(); //Get the last-accessed panel model now that we removed the closed one - var model = kiwi.connections.active_connection.panels.getByCid(panel_access[0]); + var model = _.find(_kiwi.app.panels('applets').concat(_kiwi.app.panels('connections')), {cid: panel_access[0]}); if (model) { model.view.show(); - } else { - // This is a workaround because PanelList does not contain applets - kiwi.panels()[0].view.show(); } } }); -- 2.25.1