flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adobe JIRA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-33774) grid.anchorRowIndex is reset to 0 when selection is programatically set (breaking further selection extend operations, e.g. SHIFT+CLICK)
Date Mon, 14 Oct 2013 15:07:41 GMT

    [ https://issues.apache.org/jira/browse/FLEX-33774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13794172#comment-13794172
] 

Adobe JIRA commented on FLEX-33774:
-----------------------------------

Sounds like some other class named grid is in the source path. What is the name of the test
case mxml file?




Sent via the PANTECH Discover, an AT&T 4G LTE smartphone.

"Cosma Colanicchia (JIRA)" <jira@apache.org> wrote:


    [ https://issues.apache.org/jira/browse/FLEX-33774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13793964#comment-13793964
]

Cosma Colanicchia commented on FLEX-33774:
------------------------------------------

The problem is that I'm not able to experiment with a fix by monkey patching the Grid class,
for some reason compiler complaints about a type mismatch on every "this" references in the
Grid class in my project local source file.

The Grid.doSetSelectedCells is iterating through all the cells to be selected, and passing
the last one's rowIndex/columnIndex to the doFinalizeSetSelection (which in turn reset the
anchor to 0 and use these values to set the caret). I'd try to save a reference first rowIndex/columnIndex
values too and, after the call to doFinalizeSetSelection, set them as the anchor values. This
way we do not touch the doFinalizeSetSelection method (which is used by multiple code paths)
and only touch the public Grid.selectedCell setter, that should be enough for us I think.
However, I don't know how to test this approach...




--
This message was sent by Atlassian JIRA
(v6.1#6144)


> grid.anchorRowIndex is reset to 0 when selection is programatically set (breaking further
selection extend operations, e.g. SHIFT+CLICK)
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLEX-33774
>                 URL: https://issues.apache.org/jira/browse/FLEX-33774
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Spark: DataGrid
>         Environment: Windows 7 64bit
>            Reporter: Cosma Colanicchia
>         Attachments: TestGrid.mxml, TestGrid-screenshot.png
>
>
> When the selectedItems are programatically set on a DataGrid instance, the internal grid.anchorRowIndex
is incorrectly reset to 0, even if displayed selection feedback is correct. When extending
selection with SHIFT+CLICK on other rows, this incorrect value is computed and the new selection
always starts from the first row.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message