You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Edvin Syse (JIRA)" <ji...@apache.org> on 2011/05/15 18:56:47 UTC

[jira] [Created] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

ListView with SelectMode.Multi does not allow deselection when all elements are selected
----------------------------------------------------------------------------------------

                 Key: PIVOT-744
                 URL: https://issues.apache.org/jira/browse/PIVOT-744
             Project: Pivot
          Issue Type: Bug
          Components: wtk-terra
    Affects Versions: 2.0
            Reporter: Edvin Syse
            Priority: Minor
         Attachments: TerraListViewSkinDeselect.patch

If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:

1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.

I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.

I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

Posted by "Sandro Martini (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sandro Martini updated PIVOT-744:
---------------------------------

    Attachment: pivot744_patch2.patch

patch updated to the current version of the file in trunk

> ListView with SelectMode.Multi does not allow deselection when all elements are selected
> ----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-744
>                 URL: https://issues.apache.org/jira/browse/PIVOT-744
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Edvin Syse
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.1
>
>         Attachments: TerraListViewSkinDeselect.patch, pivot744_patch2.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:
> 1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
> 2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.
> I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.
> I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

Posted by "Sandro Martini (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sandro Martini resolved PIVOT-744.
----------------------------------

    Resolution: Fixed

Resolved on ListView, and moved in the other ticked for TableView and TreeView

> ListView with SelectMode.Multi does not allow deselection when all elements are selected
> ----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-744
>                 URL: https://issues.apache.org/jira/browse/PIVOT-744
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Edvin Syse
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.1
>
>         Attachments: TerraListViewSkinDeselect.patch, pivot744_patch2.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:
> 1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
> 2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.
> I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.
> I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

Posted by "Sandro Martini (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036146#comment-13036146 ] 

Sandro Martini commented on PIVOT-744:
--------------------------------------

No, to avoid side effects (before yesterday's patch on the same classes), but it's here in attach (the newer file).
If you have time, try to apply and make some test.
If possible this evening I'll do other tests and commit but for what I've seen all seems to work good with this patch.

But for changes in behavior (on the current selection, etc via keys) we can see what to do for the 2.1 (should already exist an issue for this).


> ListView with SelectMode.Multi does not allow deselection when all elements are selected
> ----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-744
>                 URL: https://issues.apache.org/jira/browse/PIVOT-744
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Edvin Syse
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.1
>
>         Attachments: TerraListViewSkinDeselect.patch, pivot744_patch2.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:
> 1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
> 2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.
> I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.
> I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

Posted by "Sandro Martini (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034664#comment-13034664 ] 

Sandro Martini edited comment on PIVOT-744 at 5/18/11 9:59 PM:
---------------------------------------------------------------

Just fixed the behavior, in next days I'll look at your patch and do some tests, thank you for now.

      was (Author: smartini):
    Hi, 
I've just seen than before your patch I have to make another little change (in TerraListViewSkin and probably even in TerraTableViewSkin and TerraTreeViewSkin) ... because one my commit last week broke something there.
I'll tell you as soon as possible, one time all is working good as before (I have to add some other test to ensure all is good).

Note that at the moment that fix in TerraListViewSkin is this:
                 if (button == Mouse.Button.LEFT) {
-                    if (selectMode != ListView.SelectMode.NONE
-                        && !listView.isItemSelected(itemIndex)) {
-                        listView.setSelectedIndex(itemIndex);
-                    }
-

  
> ListView with SelectMode.Multi does not allow deselection when all elements are selected
> ----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-744
>                 URL: https://issues.apache.org/jira/browse/PIVOT-744
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Edvin Syse
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.1
>
>         Attachments: TerraListViewSkinDeselect.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:
> 1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
> 2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.
> I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.
> I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

Posted by "Sandro Martini (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033916#comment-13033916 ] 

Sandro Martini edited comment on PIVOT-744 at 5/18/11 10:51 PM:
----------------------------------------------------------------

It's interesting to see even in other cases if the current behavior has to be fixed (in Tables and Trees) ...


      was (Author: smartini):
    Hi Edvin,
thanks for the patch, I'll look at it this week.
It's interesting to see even in other cases if the current behavior has to be fixed (in Tables and Trees) ...

Bye,
Sandro

  
> ListView with SelectMode.Multi does not allow deselection when all elements are selected
> ----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-744
>                 URL: https://issues.apache.org/jira/browse/PIVOT-744
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Edvin Syse
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.1
>
>         Attachments: TerraListViewSkinDeselect.patch, pivot744_patch2.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:
> 1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
> 2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.
> I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.
> I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

Posted by "Edvin Syse (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036046#comment-13036046 ] 

Edvin Syse commented on PIVOT-744:
----------------------------------

My patch is NOT changing the behavior you describe, my patch will only change what happens when ALL elements are already selected. I also agree that the current behavior is weird, and not as expected, so a rewrite to the way Windows works for example would probably be wise.

> ListView with SelectMode.Multi does not allow deselection when all elements are selected
> ----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-744
>                 URL: https://issues.apache.org/jira/browse/PIVOT-744
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Edvin Syse
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.1
>
>         Attachments: TerraListViewSkinDeselect.patch, pivot744_patch2.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:
> 1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
> 2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.
> I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.
> I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036120#comment-13036120 ] 

Greg Brown commented on PIVOT-744:
----------------------------------

Was this patch actually applied? It doesn't look like it - just want to confirm.


> ListView with SelectMode.Multi does not allow deselection when all elements are selected
> ----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-744
>                 URL: https://issues.apache.org/jira/browse/PIVOT-744
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Edvin Syse
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.1
>
>         Attachments: TerraListViewSkinDeselect.patch, pivot744_patch2.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:
> 1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
> 2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.
> I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.
> I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

Posted by "Edvin Syse (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edvin Syse updated PIVOT-744:
-----------------------------

    Attachment: TerraListViewSkinDeselect.patch

Patch to allow deselection with keyboard when all elements are selected.

> ListView with SelectMode.Multi does not allow deselection when all elements are selected
> ----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-744
>                 URL: https://issues.apache.org/jira/browse/PIVOT-744
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Edvin Syse
>            Priority: Minor
>         Attachments: TerraListViewSkinDeselect.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:
> 1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
> 2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.
> I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.
> I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

Posted by "Sandro Martini (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036160#comment-13036160 ] 

Sandro Martini commented on PIVOT-744:
--------------------------------------

Ok, today I'll make some other tests and today/in a few days I'll commit changes in ListView class and only after in related classes (I wasn't sure before this discussion that the current behavior was right).


> ListView with SelectMode.Multi does not allow deselection when all elements are selected
> ----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-744
>                 URL: https://issues.apache.org/jira/browse/PIVOT-744
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Edvin Syse
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.1
>
>         Attachments: TerraListViewSkinDeselect.patch, pivot744_patch2.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:
> 1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
> 2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.
> I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.
> I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036155#comment-13036155 ] 

Greg Brown commented on PIVOT-744:
----------------------------------

OK. If you do apply this patch and it works correctly, you should be sure to make similar changes to TableView and TreeView.


> ListView with SelectMode.Multi does not allow deselection when all elements are selected
> ----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-744
>                 URL: https://issues.apache.org/jira/browse/PIVOT-744
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Edvin Syse
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.1
>
>         Attachments: TerraListViewSkinDeselect.patch, pivot744_patch2.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:
> 1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
> 2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.
> I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.
> I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

Posted by "Sandro Martini (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13037663#comment-13037663 ] 

Sandro Martini commented on PIVOT-744:
--------------------------------------

Patch applied on TerraListViewSkin and tested against tests/ ... / multiple_selection_list.bxml .
Now I have to reproduce the same behavior even on Tables and Trees before closing this issue.

In the meantime, many thanks to Edvin for the help :-) .


> ListView with SelectMode.Multi does not allow deselection when all elements are selected
> ----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-744
>                 URL: https://issues.apache.org/jira/browse/PIVOT-744
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Edvin Syse
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.1
>
>         Attachments: TerraListViewSkinDeselect.patch, pivot744_patch2.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:
> 1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
> 2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.
> I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.
> I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

Posted by "Sandro Martini (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034664#comment-13034664 ] 

Sandro Martini commented on PIVOT-744:
--------------------------------------

Hi, 
I've just seen than before your patch I have to make another little change (in TerraListViewSkin and probably even in TerraTableViewSkin and TerraTreeViewSkin) ... because one my commit last week broke something there.
I'll tell you as soon as possible, one time all is working good as before (I have to add some other test to ensure all is good).

Note that at the moment that fix in TerraListViewSkin is this:
                 if (button == Mouse.Button.LEFT) {
-                    if (selectMode != ListView.SelectMode.NONE
-                        && !listView.isItemSelected(itemIndex)) {
-                        listView.setSelectedIndex(itemIndex);
-                    }
-


> ListView with SelectMode.Multi does not allow deselection when all elements are selected
> ----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-744
>                 URL: https://issues.apache.org/jira/browse/PIVOT-744
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Edvin Syse
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.1
>
>         Attachments: TerraListViewSkinDeselect.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:
> 1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
> 2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.
> I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.
> I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

Posted by "Sandro Martini (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PIVOT-744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035835#comment-13035835 ] 

Sandro Martini commented on PIVOT-744:
--------------------------------------

excuse me (maybe I've not clear what this patch means) but the desired behavior isn't that if I press <SHIFT> <arrow down> the selection has to be expanded on lower elements (in the list, going bottom) and  <SHIFT> <arrow up> has to be expanded upwards ?
With this patch if I start going down (SHIFT+arrow down) but then I have to deselect the last element I cannot use the opposite (SHIFT+arrow up) because it will expand the selection to the first element over the first selected ... maybe I have not beeen so much clear, but it's simpler to try than to explain. 
At least on Windows should work in this way.

And in this case why not support even <CTRL> arrow up/down (to add/remove 1 element to the current selection) ?
Or move this to the 2.1 ... or another 2.0.x ?

Comments ?


> ListView with SelectMode.Multi does not allow deselection when all elements are selected
> ----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-744
>                 URL: https://issues.apache.org/jira/browse/PIVOT-744
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Edvin Syse
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.1
>
>         Attachments: TerraListViewSkinDeselect.patch, pivot744_patch2.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:
> 1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
> 2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.
> I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.
> I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

Posted by "Sandro Martini (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sandro Martini updated PIVOT-744:
---------------------------------

    Comment: was deleted

(was: Just fixed the behavior, in next days I'll look at your patch and do some tests, thank you for now.)

> ListView with SelectMode.Multi does not allow deselection when all elements are selected
> ----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-744
>                 URL: https://issues.apache.org/jira/browse/PIVOT-744
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Edvin Syse
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.1
>
>         Attachments: TerraListViewSkinDeselect.patch, pivot744_patch2.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:
> 1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
> 2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.
> I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.
> I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (PIVOT-744) ListView with SelectMode.Multi does not allow deselection when all elements are selected

Posted by "Sandro Martini (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIVOT-744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sandro Martini updated PIVOT-744:
---------------------------------

    Fix Version/s: 2.0.1
         Assignee: Sandro Martini

Hi Edvin,
thanks for the patch, I'll look at it this week.
It's interesting to see even in other cases if the current behavior has to be fixed (in Tables and Trees) ...

Bye,
Sandro


> ListView with SelectMode.Multi does not allow deselection when all elements are selected
> ----------------------------------------------------------------------------------------
>
>                 Key: PIVOT-744
>                 URL: https://issues.apache.org/jira/browse/PIVOT-744
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk-terra
>    Affects Versions: 2.0
>            Reporter: Edvin Syse
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.1
>
>         Attachments: TerraListViewSkinDeselect.patch
>
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> If you select all items in a ListView that allows multiple selection, there is not way to deselect using the keyboard. One would expect that releasing shift and moving the arrows would revert to selecting a single element, but this is not the case. The supplied patch allows deselection in the following manner:
> 1. If you select all elements with the keyboard "downwards", release shift and then press Keyboard.KeyCode.UP, the "next last" element in the list is selected.
> 2. If you select all elements with the keyboard "upwards", release shift and then press Keyboard.KeyCode.DOWN, the "next first" element in the list is selected.
> I tried to take enabled state into account when finding the approproate element to select, so the patch may be more involved than nessecary.
> I tested against ScriptApplication --src=--src=/org/apache/pivot/demos/lists/multi_select.bxml.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira