You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by mi...@apache.org on 2014/08/26 18:47:39 UTC

[1/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-32541 CAUSE: AdvancedDataGridHeaderRenderer.mouseEventToHeaderPart() assumes that sortItemRendererInstance cannot be null. However, as the project attached to the ticket shows, it can.

Repository: flex-sdk
Updated Branches:
  refs/heads/develop d4eeb05f5 -> f25593ed3


FLEX-32541
CAUSE:
AdvancedDataGridHeaderRenderer.mouseEventToHeaderPart() assumes that sortItemRendererInstance cannot be null. However, as the project attached to the ticket shows, it can.

SOLUTION:
When sortItemRendererInstance is null, we return AdvancedDataGrid.HEADER_TEXT_PART, as there is no icon.


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

Branch: refs/heads/develop
Commit: 03ae0f58adb0ce33dff7a4b0f1b97fd8009e72bc
Parents: d4eeb05
Author: Mihai Chira <mi...@apache.org>
Authored: Tue Aug 26 16:41:58 2014 +0100
Committer: Mihai Chira <mi...@apache.org>
Committed: Tue Aug 26 16:41:58 2014 +0100

----------------------------------------------------------------------
 .../advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as     | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/03ae0f58/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as b/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as
index a96acef..8c49eb1 100644
--- a/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as
+++ b/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as
@@ -791,6 +791,9 @@ public class AdvancedDataGridHeaderRenderer
      */
     public function mouseEventToHeaderPart(event:MouseEvent):String
     {
+        if(sortItemRendererInstance == null)
+            return AdvancedDataGrid.HEADER_TEXT_PART;
+
         var point:Point = new Point(event.stageX, event.stageY);
         point = globalToLocal(point);
 


[2/2] git commit: [flex-sdk] [refs/heads/develop] - FLEX-32541 Removing unused constant.

Posted by mi...@apache.org.
FLEX-32541 Removing unused constant.


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

Branch: refs/heads/develop
Commit: f25593ed396f184b0d378899941e59a30615f9ba
Parents: 03ae0f5
Author: Mihai Chira <mi...@apache.org>
Authored: Tue Aug 26 17:47:05 2014 +0100
Committer: Mihai Chira <mi...@apache.org>
Committed: Tue Aug 26 17:47:05 2014 +0100

----------------------------------------------------------------------
 .../advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as     | 3 ---
 1 file changed, 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/f25593ed/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as b/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as
index 8c49eb1..bd69089 100644
--- a/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as
+++ b/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridHeaderRenderer.as
@@ -622,9 +622,6 @@ public class AdvancedDataGridHeaderRenderer
         if (sortItemRendererWidth == 0)
             horizontalGap = 0;
 
-        // Size of label
-        const MINIMUM_SIZE:TextLineMetrics = measureText("w");
-
         // Adjust to given width
         var lineMetrics:TextLineMetrics = measureText(label.text);
         var labelWidth:Number  = lineMetrics.width + UITextField.TEXT_WIDTH_PADDING;