Commit 631316a2 authored by Dietmar Maurer's avatar Dietmar Maurer

fix NodeSelector

parent d0710a63
...@@ -2,6 +2,9 @@ Ext.define('PVE.form.ComboGrid', { ...@@ -2,6 +2,9 @@ Ext.define('PVE.form.ComboGrid', {
extend: 'Ext.form.field.ComboBox', extend: 'Ext.form.field.ComboBox',
alias: ['widget.PVE.form.ComboGrid'], alias: ['widget.PVE.form.ComboGrid'],
// this value is used as default value after load()
preferredValue: undefined,
computeHeight: function() { computeHeight: function() {
var me = this; var me = this;
var lh = PVE.Utils.gridLineHeigh(); var lh = PVE.Utils.gridLineHeigh();
...@@ -100,7 +103,7 @@ Ext.define('PVE.form.ComboGrid', { ...@@ -100,7 +103,7 @@ Ext.define('PVE.form.ComboGrid', {
me.setDisabled(false); me.setDisabled(false);
} }
var def = me.getValue(); var def = me.getValue() || me.preferredValue;
if (def) { if (def) {
me.setValue(def, true); // sync with grid me.setValue(def, true); // sync with grid
} }
......
...@@ -80,7 +80,7 @@ Ext.define('PVE.form.NodeSelector', { ...@@ -80,7 +80,7 @@ Ext.define('PVE.form.NodeSelector', {
}); });
if (me.selectCurNode && PVE.curSelectedNode.data.node) { if (me.selectCurNode && PVE.curSelectedNode.data.node) {
me.value = PVE.curSelectedNode.data.node; me.preferredValue = PVE.curSelectedNode.data.node;
} }
me.callParent(); me.callParent();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment