reset selection when sorting the items as they don't make sense after items change order any more and not doing this could also result in having more than one selected item in a single selection control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a9aead31d6
commit
6b06a7271f
@ -4810,6 +4810,11 @@ int LINKAGEMODE list_ctrl_compare_func_1( wxListLineData **arg1, wxListLineData
|
||||
|
||||
void wxListMainWindow::SortItems( wxListCtrlCompare fn, long data )
|
||||
{
|
||||
// selections won't make sense any more after sorting the items so reset
|
||||
// them
|
||||
HighlightAll(false);
|
||||
ResetCurrent();
|
||||
|
||||
list_ctrl_compare_func_2 = fn;
|
||||
list_ctrl_compare_data = data;
|
||||
m_lines.Sort( list_ctrl_compare_func_1 );
|
||||
|
Loading…
Reference in New Issue
Block a user