Skip to main content

Search and Top Navigation

#14984 closed bug (fixed)

Opened June 14, 2016 02:13PM UTC

Closed July 06, 2016 01:42PM UTC

Last modified July 06, 2016 02:01PM UTC

Controlgroup: Classes option is set incorrectly in child widgets

Reported by: gabrielschulhof Owned by: arschmitz
Priority: blocker Milestone: git
Component: ui.controlgroup Version: git (not yet released)
Keywords: Cc:
Blocked by: Blocking:
Description

There are two problems:

1. 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.

2. 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.

Attachments (0)
Change History (3)

Changed June 15, 2016 04:14PM UTC by scottgonzalez comment:1

milestone: none1.12.0
priority: minorblocker
status: newopen

Changed July 06, 2016 01:42PM UTC by arschmitz comment:2

owner: → arschmitz
resolution: → fixed
status: openclosed

In [changeset:"3a9a3c7c5bfa8d5695c74385e34d3f4cbb06472b" 3a9a3c7]:

#!CommitTicketReference repository="" revision="3a9a3c7c5bfa8d5695c74385e34d3f4cbb06472b"
Controlgroup: Correctly handle non-empty child class key

Fixes #14984
Closes gh-1713

Changed July 06, 2016 02:01PM UTC by scottgonzalez comment:3

milestone: 1.12.0git