Upgrade to ExtJS 3.0.3 - Released 10/11/2009
[extjs.git] / src / widgets / layout / CardLayout.js
index 6c3c902..18f4b70 100644 (file)
@@ -1,5 +1,5 @@
 /*!
- * Ext JS Library 3.0.0
+ * Ext JS Library 3.0.3
  * Copyright(c) 2006-2009 Ext JS, LLC
  * licensing@extjs.com
  * http://www.extjs.com/license
@@ -106,10 +106,11 @@ Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, {
             if(this.activeItem){\r
                 this.activeItem.hide();\r
             }\r
+            var layout = item.doLayout && (this.layoutOnCardChange || !item.rendered);\r
             this.activeItem = item;\r
             item.show();\r
-            this.container.doLayout();\r
-            if(this.layoutOnCardChange && item.doLayout){\r
+            this.layout();\r
+            if(layout){\r
                 item.doLayout();\r
             }\r
         }\r