#14984 closed bug (fixed)
Controlgroup: Classes option is set incorrectly in child widgets
Reported by: | Gabriel "_|Nix|_" Schulhof | Owned by: | Alexander Schmitz |
---|---|---|---|
Priority: | blocker | Milestone: | git |
Component: | ui.controlgroup | Version: | git (not yet released) |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
There are two problems:
- When the controlgroup instantiates a child widget, it does not consult the default classes option for that widget class when computing the options with which to instantiate the widget because it cannot find a widget instance from which to retrieve the default classes option.
The solution: If no instance is found, first instantiate the widget with default options, then retrieve the options and use them to compute the needed classes option.
- The variable used to store the per-instance options inside _initWigdets() has a per-widget-class scope rather than a per-widget-instance scope and it is being modified at each instance. So, if a non-corners-related class is present at a class key, it gets copied over and over inside the class key's value as many times as there are widgets of that class inside the controlgroup.
The solution: Clone the value of the variable established at the per-widget-class scope (options) into a new variable used at the per-instance scope (instanceOptions). Then, only the per-instance-scoped variable will be modified and it will be re-declared at the iteration for the next instance.
Change History (3)
comment:1 Changed 7 years ago by
Milestone: | none → 1.12.0 |
---|---|
Priority: | minor → blocker |
Status: | new → open |
comment:2 Changed 7 years ago by
Owner: | set to Alexander Schmitz |
---|---|
Resolution: | → fixed |
Status: | open → closed |
comment:3 Changed 7 years ago by
Milestone: | 1.12.0 → git |
---|
Note: See
TracTickets for help on using
tickets.
In 3a9a3c7: