point out forcibly to Flex that as I have closed the popup, I might like to be able...
authorRichard Fairhurst <richard@systemed.net>
Tue, 15 Feb 2011 17:26:34 +0000 (17:26 +0000)
committerRichard Fairhurst <richard@systemed.net>
Tue, 15 Feb 2011 17:26:34 +0000 (17:26 +0000)
net/systemeD/potlatch2/TagViewer.mxml

index f1fecd4..a4b35bb 100644 (file)
 
       /** Set the icon, categorySelector and help text for the current entity. */
       private function setCategorySelector(entity:Entity, feature:Feature):void {
-                       // Remove the "user has selected something" event listener from previous categorySelector
-                       if (currentCategorySelector) currentCategorySelector.removeEventListener("selectedType", changeFeatureType);
+                       // Remove the "user has selected something" event listener from previous categorySelector,
+                       // and make it invisible because Flex is crap at updating click areas otherwise
+                       if (currentCategorySelector) { 
+                               currentCategorySelector.removeEventListener("selectedType", changeFeatureType);
+                               currentCategorySelector.visible=false;
+                       }
                        
                        // Have we cached the categorySelector for this limitType? If not, create one
                        var lt:String=limitType(entity);
                                        iconText.htmlText = "<b>No tags set</b><br/><font size='10pt'>Please use the menu below to define what this "+entity.getType()+" is</font>";
                                }
                        }
+
+                       // Set it as the popup, and make sure it's visible
                        popupChange.popUp=currentCategorySelector;
+                       currentCategorySelector.visible=true;
       }
 
          private function isMultipleEditable(entities:Array):Boolean {