Repository: flex-sdk
Updated Branches:
  refs/heads/develop d726aee2d -> 59cefd8e3


FLEX-35306 Reverting the fix for FLEX-19651 because it introduced the 
FLEX-35306 regression.

CAUSE: Due to the fix for FLEX-19651, when the data provider is reset on a 
(DropDown)List right after the selected item (from this new data provider) is 
set, a validation cycle is forced on the list immediately before the new data 
provider is assigned to it. As a consequence, ListBase.commitProperties() fails 
when trying to find the selected item in the data provider (because, for now, 
it's still the old one, which doesn't have the new item), thus clearing the 
selection. But if the list had requireSelection set to true, then the first 
item in the old provider will be selected nonetheless. And if there was a 
two-way binding between the list and the model, then the model will at this 
point be rewritten, most probably wrongly.

SOLUTION: we're reverting the fix for FLEX-19651, which was a minor bug, and 
seeing if any mustella or unit tests fail. If so, we'll find other ways to fix 
FLEX-19651.

NOTES: FLEX-19651 doesn't have enough data to reproduce it, so I can't know for 
sure if it's still there or not. But after playing a bit with multiple 
selection and data provider changes, as the ticket suggests, there doesn't 
appear to be any major difference.


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

Branch: refs/heads/develop
Commit: 59cefd8e3f5aa8c252f8e06bb5a4a27f95509ef4
Parents: d726aee
Author: Mihai Chira <mih...@apache.org>
Authored: Wed May 17 13:31:23 2017 +0200
Committer: Mihai Chira <mih...@apache.org>
Committed: Wed May 17 13:31:23 2017 +0200

----------------------------------------------------------------------
 .../projects/spark/src/spark/components/List.as | 29 --------------------
 1 file changed, 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/59cefd8e/frameworks/projects/spark/src/spark/components/List.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/List.as 
b/frameworks/projects/spark/src/spark/components/List.as
index c457c5b..d122821 100644
--- a/frameworks/projects/spark/src/spark/components/List.as
+++ b/frameworks/projects/spark/src/spark/components/List.as
@@ -630,36 +630,7 @@ public class List extends ListBase implements 
IFocusManagerComponent
         super.useVirtualLayout = value;
     }
     
-    //----------------------------------
-    //  dataProvider
-    //----------------------------------
 
-    [Inspectable(category="Data")]
-    
-    /**
-     *  @private
-     *  
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    override public function set dataProvider(value:IList):void
-    {
-        // Uconditionally clear the selection, see SDK-21645.  Can't wait
-        // to commit the selection because it could be set again before
-        // commitProperties runs and that selection gets lost.
-        if (!isEmpty(_proposedSelectedIndices) || !isEmpty(selectedIndices))
-        {
-            _proposedSelectedIndices.length = 0;
-            multipleSelectionChanged = true;
-            invalidateProperties();
-            UIComponentGlobals.layoutManager.validateClient(this, true);
-        }
-        super.dataProvider = value;
-    }
-        
-        
     
//--------------------------------------------------------------------------
     //
     //  Properties

Reply via email to