Well I managed to do it anyway by calling deselectAll() if multiple selection of the selection manager is off.

So typical code is now:

     if(manager.getMultiSelection()) {
           manager.setItemSelected(item,false);
     }
     else {
           manager.deselectAll();
     }

I need this for the pending enhancement patch destroy() and destroyContent() for qx.ui.tree:

http://bugzilla.qooxdoo.org/show_bug.cgi?id=178

where the tree files and folders are disconnected, removed and disposed. If the selected item is destroyed I have to deselect it previously by calling the code above.

Sebastian Werner schrieb:
Hi Dietrich,

you can overwrite this behavior. But the targets of all qooxdoo widgets 
are to implement the default like seen in typical native applications. 
In all the lists I know off you can't deselect in a list which only 
allows a single selection. Maybe we can convert it to a property. A 
patch would be appreciated.

Cheers,

Sebastian


Dietrich Streifert schrieb:
  
Hello List,

it seems that deselecting a single item in 
qx.manager.selection.SelectionManager (especially in the derived 
qx.manager.selection.TreeSelectionManager) is not possible.

calling:

    manager.setItemSelected(item,false);

when given item ist the current selected item does nothing.

I found a comment in SelectionManager method setItemSelected:

        // Pre-check if item is currently selected
        // Do not allow deselection in single selection mode

Why is this necessary?

I want to be able to deselect the current selection event in single 
selection mode.

Thank you for answering.

Best regards.

    


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
  

-- 
Mit freundlichen Grüßen
Dietrich Streifert
Visionet GmbH
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to