From f5c68a74c7edb79b9963bcf557ee8ca528b3c803 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 21 Oct 2019 15:20:11 +0200 Subject: [PATCH] ui settings: fix noVNC scaling mode radiogroup setValue radio groups set and get Value helper are objects, as they are expected to be key, value, where key is a field-name of the radio group and values is the inputValue from the radiobutton to be set. So ensure we extract only the value in the change event handler, as we do not want to save the whole object. But on restoring (setValue) we need to wrap it as object again, else radiogroup won't know what field we want to set.. Signed-off-by: Thomas Lamprecht --- www/manager6/window/Settings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/manager6/window/Settings.js b/www/manager6/window/Settings.js index 910389ec..0a6247fc 100644 --- a/www/manager6/window/Settings.js +++ b/www/manager6/window/Settings.js @@ -39,7 +39,7 @@ Ext.define('PVE.window.Settings', { me.lookupReference('savedUserName').setValue(username); var vncMode = sp.get('novnc-scaling'); if (vncMode !== undefined) { - me.lookupReference('noVNCScalingGroup').setValue(vncMode); + me.lookupReference('noVNCScalingGroup').setValue({ noVNCScalingField: vncMode }); } var settings = ['fontSize', 'fontFamily', 'letterSpacing', 'lineHeight']; @@ -377,7 +377,7 @@ Ext.define('PVE.window.Settings', { listeners: { change: function(el, newValue, undefined) { var sp = Ext.state.Manager.getProvider(); - sp.set('novnc-scaling', newValue); + sp.set('novnc-scaling', newValue.noVNCScalingField); } }, },