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 2013/10/22 00:37:26 UTC

[34/50] git commit: [flex-sdk] [refs/heads/master] - FIX https://issues.apache.org/jira/browse/FLEX-33813 (DataGrid goes blank when scrolled and dataProvider is changed ) FIX minor ASDOC wording in CalloutSkin for desktop

FIX https://issues.apache.org/jira/browse/FLEX-33813 (DataGrid goes blank when scrolled and dataProvider is changed )
FIX minor ASDOC wording in CalloutSkin for desktop


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

Branch: refs/heads/master
Commit: 35706c9c1f0d15961d7fec0f81a9cf3e779538c0
Parents: 0234ed5
Author: mamsellem <ma...@systar.com>
Authored: Mon Oct 14 02:13:41 2013 +0200
Committer: mamsellem <ma...@systar.com>
Committed: Mon Oct 14 02:13:41 2013 +0200

----------------------------------------------------------------------
 .../projects/spark/src/spark/components/Grid.as | 24 ++++++++++++++++----
 .../spark/src/spark/skins/spark/CalloutSkin.as  |  3 +--
 2 files changed, 21 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/35706c9c/frameworks/projects/spark/src/spark/components/Grid.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/components/Grid.as b/frameworks/projects/spark/src/spark/components/Grid.as
index 7deb6eb..847fa1d 100644
--- a/frameworks/projects/spark/src/spark/components/Grid.as
+++ b/frameworks/projects/spark/src/spark/components/Grid.as
@@ -269,6 +269,8 @@ public class Grid extends Group implements IDataGridElement, IDataProviderEnhanc
      *  rowIndex of the caret after a collection refresh event.
      */    
     private var caretSelectedItem:Object = null;
+    private var updateCaretForDataProviderChanged:Boolean = false;
+    private var updateCaretForDataProviderChangeLastEvent:CollectionEvent;
     
     /**
      *  @private
@@ -4599,7 +4601,12 @@ public class Grid extends Group implements IDataGridElement, IDataProviderEnhanc
         clearInvalidateDisplayListReasons = true;
 		
 		if (!variableRowHeight)
-			setFixedRowHeight(gridDimensions.getRowHeight(0));    
+			setFixedRowHeight(gridDimensions.getRowHeight(0));
+        if (updateCaretForDataProviderChanged){
+            updateCaretForDataProviderChanged = false;
+            updateCaretForDataProviderChange(updateCaretForDataProviderChangeLastEvent);
+            updateCaretForDataProviderChangeLastEvent = null;
+        }
 	}
         
     //--------------------------------------------------------------------------
@@ -5446,7 +5453,6 @@ public class Grid extends Group implements IDataGridElement, IDataProviderEnhanc
                 else 
                 {
                     caretRowIndex = _dataProvider.length > 0 ? 0 : -1;
-                   validateNow();
                    verticalScrollPosition = 0;
                 }
                 
@@ -5620,8 +5626,18 @@ public class Grid extends Group implements IDataGridElement, IDataProviderEnhanc
         invalidateSize();
         invalidateDisplayList();
         
-        if (caretRowIndex != -1)
-            updateCaretForDataProviderChange(event);
+        if (caretRowIndex != -1)  {
+            if (event.kind == CollectionEventKind.RESET){
+                // defer for reset events 
+                updateCaretForDataProviderChanged = true;
+                updateCaretForDataProviderChangeLastEvent = event;
+                invalidateDisplayList(); 
+            }
+            else {
+                updateCaretForDataProviderChange(event);
+            }         
+        }
+
         
         // Trigger bindings to selectedIndex/selectedCell/selectedItem and the plurals of those.
         if (selectionChanged)

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/35706c9c/frameworks/projects/spark/src/spark/skins/spark/CalloutSkin.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/spark/src/spark/skins/spark/CalloutSkin.as b/frameworks/projects/spark/src/spark/skins/spark/CalloutSkin.as
index 6d4f91d..6b15598 100644
--- a/frameworks/projects/spark/src/spark/skins/spark/CalloutSkin.as
+++ b/frameworks/projects/spark/src/spark/skins/spark/CalloutSkin.as
@@ -47,8 +47,7 @@ import spark.skins.spark.supportClasses.CalloutArrow;
 use namespace mx_internal;
 
 /**
- *  The default skin class for the Spark Callout component in mobile
- *  applications.
+ *  The default skin class for the Spark Callout component in desktop applications.
  * 
  *  <p>The <code>contentGroup</code> lies above a <code>backgroundColor</code> fill
  *  which frames the <code>contentGroup</code>. The position and size of the frame