flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mkess...@apache.org
Subject git commit: [flex-sdk] - FLEX-28883: Corrected the requireSelection being ignored on dataProvider's being refreshed. It's original default behavior was to remove any selection and leave it that way.
Date Thu, 18 Apr 2013 01:42:00 GMT
Updated Branches:
  refs/heads/develop 92448d797 -> c858daafb


FLEX-28883:  Corrected the requireSelection being ignored on dataProvider's being refreshed.
 It's original default behavior was to remove any selection and leave it that way.


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

Branch: refs/heads/develop
Commit: c858daafbe8738ce993a88296c58bafe884376ed
Parents: 92448d7
Author: Mark Kessler <KesslerConsulting@gmail.com>
Authored: Wed Apr 17 21:40:08 2013 -0400
Committer: Mark Kessler <KesslerConsulting@gmail.com>
Committed: Wed Apr 17 21:41:31 2013 -0400

----------------------------------------------------------------------
 .../spark/components/supportClasses/ListBase.as    |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/c858daaf/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as b/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
index a25f9df..74d0d73 100644
--- a/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ b/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -1497,10 +1497,17 @@ public class ListBase extends SkinnableDataContainer
      */
     mx_internal function dataProviderRefreshed():void
     {
-        selectedItem = undefined;
-        setSelectedIndex(NO_SELECTION, false);
-        // TODO (rfrishbe): probably don't need the setCurrentCaretIndex below
-        setCurrentCaretIndex(NO_CARET);
+        if (requireSelection == true)
+        {
+            setSelectedIndex(0, false);
+        }
+        else
+        {
+            selectedItem = undefined;
+            setSelectedIndex(NO_SELECTION, false);
+            // TODO (rfrishbe): probably don't need the setCurrentCaretIndex below
+            setCurrentCaretIndex(NO_CARET);
+        }
     }
     
     /**


Mime
View raw message