Do not sum digits for widget width when some parts are unknown

Closes #14384
(grafted from cd8a0670dd5c6274062e92a40a39509105c800ec)

--HG--
branch : 7.0
This commit is contained in:
Cédric Krier
2025-11-27 01:14:59 +01:00
parent fdf41cb962
commit 05b4551799
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -2101,7 +2101,7 @@ function eval_pyson(value){
},
get width() {
var digits = this.digits;
if (digits) {
if (digits && digits.every(d => d !== null)) {
return digits.reduce(function(acc, cur) {
return acc + cur;
});
@@ -14,7 +14,7 @@ class Float(Integer):
@property
def width(self):
digits = self.digits
if digits:
if digits and all(d is not None for d in digits):
return sum(digits)
else:
return self.attrs.get('width', 18)