[fusion-commits] r1638 - trunk/lib
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed Nov 5 11:14:02 EST 2008
Author: pagameba
Date: 2008-11-05 11:14:02 -0500 (Wed, 05 Nov 2008)
New Revision: 1638
Modified:
trunk/lib/ApplicationDefinition.js
trunk/lib/Widget.js
Log:
Re #146. Move handling of the isExclusive attribute of widgets into the setUiObj method of Widget so that two instances of the same widget don't end up deactivating themselves (visually deactivating the button) while leaving the widget active.
Modified: trunk/lib/ApplicationDefinition.js
===================================================================
--- trunk/lib/ApplicationDefinition.js 2008-11-05 15:34:12 UTC (rev 1637)
+++ trunk/lib/ApplicationDefinition.js 2008-11-05 16:14:02 UTC (rev 1638)
@@ -887,9 +887,6 @@
imageClass: widgetTag.imageClass,
toggle: widget.isExclusive
}));
- if (widget.isExclusive) {
- widget.getMap().buttonSet.add(widget.uiObj);
- }
}
container.add(widget.uiObj);
if (widget.uiObj.setEnabled) {
@@ -922,9 +919,6 @@
widget.uiObj.setEnabled(widget.isEnabled());
});
}
- if (widget.isExclusive) {
- widget.getMap().buttonSet.add(widget.uiObj);
- }
}
} else {
Fusion.reportError(new Fusion.Error(Fusion.Error.WARNING,
Modified: trunk/lib/Widget.js
===================================================================
--- trunk/lib/Widget.js 2008-11-05 15:34:12 UTC (rev 1637)
+++ trunk/lib/Widget.js 2008-11-05 16:14:02 UTC (rev 1638)
@@ -86,6 +86,12 @@
setUiObject: function(uiObj) {
Fusion.Widget.uiInstances[this.type].push(uiObj);
+ if (this.isExclusive) {
+ this.getMap().buttonSet.add(uiObj);
+ }
+ if (uiObj.options.active) {
+ this.activate();
+ }
if (uiObj.addEvents) {
if (Fusion.Widget.uiInstances[this.type][0].options.active) {
uiObj.options.active = true;
More information about the fusion-commits
mailing list