if the selected node has its status changed between stop &
running, the node is removed and then readded
during the remove / add process the 'selected' status of the node
is lost if it has one, so we need to reselect it

this fixes a graphical bug where starting/stopping a VM/container would display
an empty config panel if this precise node was currently selected
---
 www/manager6/tree/ResourceTree.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/www/manager6/tree/ResourceTree.js 
b/www/manager6/tree/ResourceTree.js
index 711a386..df496a4 100644
--- a/www/manager6/tree/ResourceTree.js
+++ b/www/manager6/tree/ResourceTree.js
@@ -303,10 +303,14 @@ Ext.define('PVE.tree.ResourceTree', {
                me.selectById(lastsel.data.id);
            }
 
+           // on first tree load set the selection from the stateful provider
            if (!pdata.updateCount) {
                rootnode.collapse();
                rootnode.expand();
                me.applyState(sp.get(stateid));
+           } else {
+               // if a node status changed (start/stop), we need to force 
selection
+               me.getSelection()[0] || me.selectById(lastsel.data.id );
            }
 
            pdata.updateCount++;
-- 
2.1.4


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to