From cad1c950fd79057ebfd89e362a2b54eb3e588a5c Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Fri, 3 Feb 2017 11:59:57 +0500 Subject: Better cleanup after device remove --- web/app/view/DevicesController.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'web/app/view/DevicesController.js') diff --git a/web/app/view/DevicesController.js b/web/app/view/DevicesController.js index e856731..cd85834 100644 --- a/web/app/view/DevicesController.js +++ b/web/app/view/DevicesController.js @@ -32,11 +32,11 @@ Ext.define('Traccar.view.DevicesController', { listen: { controller: { '*': { - selectreport: 'selectReport', - deselectfeature: 'deselectFeature' + selectreport: 'selectReport' }, 'map': { - selectdevice: 'selectDevice' + selectdevice: 'selectDevice', + deselectfeature: 'deselectFeature' } }, store: { @@ -101,6 +101,8 @@ Ext.define('Traccar.view.DevicesController', { this.updateButtons(selected); if (selected.getCount() > 0) { this.fireEvent('selectdevice', selected.getLastSelected(), true); + } else { + this.fireEvent('deselectfeature'); } }, -- cgit v1.2.3