Closed DanicaSTFC closed 5 months ago
This issue could be solved together with https://github.com/TomographicImaging/eqt/issues/108#issue-2006074581
We will include the widget number in the dictionary (for both states and default states) in this PR
From @lauramurgatroyd
I think we need to think carefully about this dictionary. Firstly, we know we want to store other things about widgets in later PRs, including their widget number https://github.com/TomographicImaging/eqt/issues/95. Therefore I would consider whether a 'widget_properties' dictionary could be a better plan, structured something like: self.widget_properties = { 'widget_name': {'default': , 'widget_number': }, .... }
(or with some snappier/better name for widget_number)
and could include other information as we think of it, that could be useful.
Then the 'default' section of that dict would hold a dictionary that contains the default state: https://github.com/TomographicImaging/eqt/blob/ec2c5a11bd333452754f6931cb636bf237792649/eqt/ui/UIFormWidget.py#L170-L173
_Originally posted by @lauramurgatroyd in https://github.com/TomographicImaging/eqt/pull/97#discussion_r1381423714_
https://github.com/TomographicImaging/eqt/pull/97#discussion_r1381674557
@DanicaSTFC and I discussed the benefits of separating the default state from the widget number, and store them in different places. This would include being able to take one widget with its defaults and add to a different form easily without bringing across also widget position.