Fix selection on right click in generic wxListCtrl
Right clicking item always selected it, which made it possible to have
multiple selected items even in a single-selection control.
Restore HighlightAll(false) erroneously removed by fedc80eee3
(Improve
selection and focus events generation in wxGenericLisCtrl, 2020-09-06)
to fix this and restore the correct old behaviour.
Note that even in multiple selection mode right clicking a previously
unselected item should still clear the selection, as it does it in the
other GTK programs (and also under MSW).
This commit is contained in:
@@ -2682,6 +2682,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
|
|||||||
// Multi-selections should not be cleared if a selected item is clicked.
|
// Multi-selections should not be cleared if a selected item is clicked.
|
||||||
if (!IsHighlighted(current))
|
if (!IsHighlighted(current))
|
||||||
{
|
{
|
||||||
|
HighlightAll(false);
|
||||||
ChangeCurrent(current);
|
ChangeCurrent(current);
|
||||||
HighlightOnly(m_current);
|
HighlightOnly(m_current);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user