You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2017/12/31 00:03:26 UTC

[35/50] git commit: [flex-sdk] [refs/heads/master] - FLEX-35321 CAUSE: if the object isn't on stage when we'd normally set its initialized flag to true, we correctly skip this step, but we also need to set its updateCompletePendingFlag back to false, so

FLEX-35321 CAUSE: if the object isn't on stage when we'd normally set its initialized flag to true, we correctly skip this step, but we also need to set its updateCompletePendingFlag back to false, so that in case it's added to stage again it can work correctly, and have its initialized flag set to true as expected. This second step was skipped in the previous commit. This could be noticed, for example, in DataGrid, which would not show the renderers which it initially used in GridViewLayout.updateTypicalCellSizes().
SOLUTION: set the updateCompletePendingFlag to false even if the object isn't on stage anymore.
NOTES: also removed unused imports and an unused local variable.


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/243507a7
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/243507a7
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/243507a7

Branch: refs/heads/master
Commit: 243507a7346b6acbba755833a970dccdb48cf375
Parents: fcc2586
Author: Mihai Chira <mi...@apache.org>
Authored: Wed Aug 30 10:27:35 2017 +0200
Committer: Mihai Chira <mi...@apache.org>
Committed: Wed Aug 30 10:27:35 2017 +0200

----------------------------------------------------------------------
 .../projects/framework/src/mx/managers/LayoutManager.as  | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/243507a7/frameworks/projects/framework/src/mx/managers/LayoutManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/framework/src/mx/managers/LayoutManager.as b/frameworks/projects/framework/src/mx/managers/LayoutManager.as
index d070203..131838e 100644
--- a/frameworks/projects/framework/src/mx/managers/LayoutManager.as
+++ b/frameworks/projects/framework/src/mx/managers/LayoutManager.as
@@ -19,14 +19,10 @@
 
 package mx.managers
 {
-import flash.display.DisplayObject;
-import flash.display.Sprite;
 import flash.display.Stage;
 import flash.events.Event;
 import flash.events.EventDispatcher;
 
-import mx.core.ILayoutElement;
-import mx.core.UIComponent;
 import mx.core.UIComponentGlobals;
 import mx.core.mx_internal;
 import mx.events.DynamicEvent;
@@ -852,8 +848,9 @@ public class LayoutManager extends EventDispatcher implements ILayoutManager
                         obj.initialized = true;
                     if (obj.hasEventListener(FlexEvent.UPDATE_COMPLETE))
                         obj.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
-                    obj.updateCompletePendingFlag = false;
                 }
+
+                obj.updateCompletePendingFlag = false;
                 obj = ILayoutManagerClient(updateCompleteQueue.removeLargest());
             }
 
@@ -930,7 +927,6 @@ public class LayoutManager extends EventDispatcher implements ILayoutManager
 		var lastCurrentObject:ILayoutManagerClient = currentObject;
 		
         var obj:ILayoutManagerClient;
-        var i:int = 0;
         var done:Boolean = false;
         var oldTargetLevel:int = targetLevel;
 
@@ -1104,8 +1100,9 @@ public class LayoutManager extends EventDispatcher implements ILayoutManager
 
                         if (obj.hasEventListener(FlexEvent.UPDATE_COMPLETE))
                             obj.dispatchEvent(new FlexEvent(FlexEvent.UPDATE_COMPLETE));
-                        obj.updateCompletePendingFlag = false;
                     }
+
+                        obj.updateCompletePendingFlag = false;
                     obj = ILayoutManagerClient(updateCompleteQueue.removeLargestChild(target));
                 }
             }