From 8f4239262c5e7ab762c194e4bf34997d9c722543 Mon Sep 17 00:00:00 2001 From: Richard Fairhurst Date: Fri, 17 Jun 2011 09:55:20 +0100 Subject: [PATCH] Fix tab selection bug --- net/systemeD/potlatch2/TagViewer.mxml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/net/systemeD/potlatch2/TagViewer.mxml b/net/systemeD/potlatch2/TagViewer.mxml index d477a57d..3aa74480 100644 --- a/net/systemeD/potlatch2/TagViewer.mxml +++ b/net/systemeD/potlatch2/TagViewer.mxml @@ -230,6 +230,7 @@ import mx.events.DragEvent; import mx.managers.DragManager; import mx.core.DragSource; + import mx.controls.TabBar; import flexlib.containers.SuperTabNavigator; [Bindable] @@ -379,6 +380,14 @@ private var tabComponents:Object = {}; private function initialiseEditors():void { + // reset tab to 0 to work around TabNavigator bug (#3444) + if (editorStack is TabNavigator) { + try { + var tabBar:TabBar=TabBar(TabNavigator(editorStack).getTabAt(0).parent); + tabBar.selectedIndex=0; + } catch(errObject:Error) {} + } + editorStack.removeAllChildren(); if ( selectedEntity == null || feature == null ) return; -- 2.36.1