Summary
In DataLab 1.0.0+, when editing the pixel size of an image (Δx or Δy field in the image properties panel), the input field behaves strangely: most digits typed after the first one are interpreted as decimal places of the first digit, instead of being appended to the value.
Reproduction
- Open DataLab and load (or create) an image.
- In the image properties panel, locate the pixel size fields (
Δx, Δy).
- Click into the
Δx field and select its entire content (e.g. 1.0).
- Type
52.
Observed: the field shows 5.02 (the 5 is taken as units, but the 2 is interpreted as hundredths). Apply does not save the intended value.
Expected: the field shows 52, and applying saves Δx = 52.
Other examples:
- Typing
0.25 in place of 1.0 produces 0.0.25 (invalid).
- Typing
7 in place of 1.0 produces 7.0 then any next keystroke is appended after the spurious decimal part.
Impact
- Makes pixel size editing essentially unusable: any multi-character entry is corrupted.
- Affects calibration workflows where users need to set non-trivial
Δx / Δy values (e.g. wavelengths, micrometers per pixel).
- Reported on DataLab 1.2.0; reproduced on current
main.
Root cause and fix
The bug originates in guidata (since v3.13.0), in the reactive update mechanism that refreshes computed fields (e.g. xmin, xmax, ymin, ymax) when an editable field they depend on (Δx, Δy) changes. Each refresh re-entered the same callback with a different "exclusion target" and ended up overwriting the field the user was actively typing in.
A fix has been applied in guidata. DataLab will pick it up automatically once the corresponding guidata release is published and DataLab's minimum required version is bumped accordingly.
See companion guidata issue: PlotPyStack/guidata#104.
Validation (after guidata fix)
- Editing
Δx / Δy from the image properties panel now accepts arbitrary multi-digit values (52, 0.25, 7, …).
- Computed fields (
xmin, xmax, ymin, ymax) update correctly after Apply.
Summary
In DataLab 1.0.0+, when editing the pixel size of an image (
ΔxorΔyfield in the image properties panel), the input field behaves strangely: most digits typed after the first one are interpreted as decimal places of the first digit, instead of being appended to the value.Reproduction
Δx,Δy).Δxfield and select its entire content (e.g.1.0).52.Observed: the field shows
5.02(the5is taken as units, but the2is interpreted as hundredths). Apply does not save the intended value.Expected: the field shows
52, and applying savesΔx = 52.Other examples:
0.25in place of1.0produces0.0.25(invalid).7in place of1.0produces7.0then any next keystroke is appended after the spurious decimal part.Impact
Δx/Δyvalues (e.g. wavelengths, micrometers per pixel).main.Root cause and fix
The bug originates in guidata (since v3.13.0), in the reactive update mechanism that refreshes computed fields (e.g.
xmin,xmax,ymin,ymax) when an editable field they depend on (Δx,Δy) changes. Each refresh re-entered the same callback with a different "exclusion target" and ended up overwriting the field the user was actively typing in.A fix has been applied in guidata. DataLab will pick it up automatically once the corresponding guidata release is published and DataLab's minimum required version is bumped accordingly.
See companion guidata issue: PlotPyStack/guidata#104.
Validation (after guidata fix)
Δx/Δyfrom the image properties panel now accepts arbitrary multi-digit values (52,0.25,7, …).xmin,xmax,ymin,ymax) update correctly after Apply.