From bc42bb3c6e30b5f5d8f033620278332329dff530 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 12 Apr 2021 14:10:57 +0200 Subject: [PATCH] ui: nav tree: make datastore-add button less special cased Signed-off-by: Thomas Lamprecht --- www/NavigationTree.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/NavigationTree.js b/www/NavigationTree.js index 98c3a847..0b179d9d 100644 --- a/www/NavigationTree.js +++ b/www/NavigationTree.js @@ -101,6 +101,7 @@ Ext.define('PBS.store.NavigationStore', { iconCls: 'fa fa-plus-circle', leaf: true, id: 'addbutton', + virtualEntry: true, }, ], }, @@ -230,7 +231,7 @@ Ext.define('PBS.view.main.NavigationTree', { // remove entries which are not existing anymore let toRemove = []; list.eachChild(child => { - if (!existingChildren[child.data.text] && child.data.id !== 'addbutton') { + if (!existingChildren[child.data.text] && !child.data.virtualEntry) { toRemove.push(child); } });