Closed claudio-rosati closed 6 years ago
In principle, good idea, but this exact implementation doesn't work because it's unconditionally swapping width & height.
Take examples/monitors_bytemonitor.bob
. In there, Byte Monitor_3 is vertical, with width of 35 and height of 116. As the widget is loaded, the horizontal
property listener detects that the widget is configured to be vertical, and swaps the size to width of 116 and height of 35.
Same happens to our operational displays like this motor detail where the "MSTA" is vertical, and width/height were erroneously swapped:
I'll implement this in the representation, where toolkit.isEditMode()
can detect that we're editing, and thus only apply the change 1) after the widget model has been loaded (which is the issue in this pull requrst) and 2) when interactively editing.
Found a fix that works for existing displays yet triggers the width/height swap when editing. Will port from phoebus version.
Try now.
You're right. Thank you.
This PR addressed what happens when
horizontal
is changed in ByteMonitor widget, moving from this situationto the following one
The change happens in the model, because I don't think it is a representation business.