fix #1629: improve min/max memory handling
instead of directly setting the minvalue when the maxvalue is lower we invalidate it and only on blur we set the minvalue without this we lose the minvalue when editing only the maxvalue e.g.: Max: 2048 Min: 1024 if we now edit the maxvalue to 4096, on pressing the '4', we are setting the minvalue to '4' because 4 is lower than 1024 Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
07de011804
commit
b6450910ce
@ -99,12 +99,18 @@ Ext.define('PVE.qemu.MemoryInputPanel', {
|
||||
labelWidth: labelWidth,
|
||||
listeners: {
|
||||
change: function(f, value) {
|
||||
var bf = me.down('field[name=balloon]');
|
||||
var balloon = bf.getValue();
|
||||
bf.setMaxValue(value);
|
||||
bf.validate();
|
||||
},
|
||||
blur: function(f) {
|
||||
var value = f.getValue();
|
||||
var bf = me.down('field[name=balloon]');
|
||||
var balloon = bf.getValue();
|
||||
if (balloon > value) {
|
||||
bf.setValue(value);
|
||||
}
|
||||
bf.setMaxValue(value);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user