Reset selection on right click in a more efficient way
Instead of using HighlightAll(), use the second argument of HighlightOnly() to remove selection from the previous current item.
This commit is contained in:
parent
0e9e6aaf3a
commit
cb6d67bab4
@ -2682,9 +2682,9 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
|
||||
// Multi-selections should not be cleared if a selected item is clicked.
|
||||
if (!IsHighlighted(current))
|
||||
{
|
||||
HighlightAll(false);
|
||||
size_t oldCurrent = m_current;
|
||||
ChangeCurrent(current);
|
||||
HighlightOnly(m_current);
|
||||
HighlightOnly(m_current, oldCurrent);
|
||||
}
|
||||
|
||||
SendNotify( current, wxEVT_LIST_ITEM_RIGHT_CLICK, event.GetPosition() );
|
||||
|
Loading…
Reference in New Issue
Block a user