Don't reset selection while Ctrl or Shift key is pressed
Don't reset the selection in a generic multi-selection wxListCtrl while Ctrl or Shift key is pressed to be consistent with wxMSW behaviour. This commit is best viewed ignoring whitespace-only changes. Closes #24332.
This commit is contained in:
parent
1bef48229e
commit
85b04c1c24
1 changed files with 11 additions and 6 deletions
|
|
@ -2548,6 +2548,10 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
|
|||
GetParent()->GetEventHandler()->ProcessEvent(evtCtx);
|
||||
}
|
||||
else if (event.LeftDown())
|
||||
{
|
||||
// reset the selection in multi-selection mode only when Ctrl and
|
||||
// Shift keys are not pressed to mimic MSW behaviour
|
||||
if ( IsSingleSel() || !(event.ControlDown() || event.ShiftDown()) )
|
||||
{
|
||||
// reset the selection and bail out
|
||||
HighlightAll(false);
|
||||
|
|
@ -2556,6 +2560,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
|
|||
if ( IsVirtual() && !IsSingleSel() )
|
||||
SendNotify( m_lineLastClicked, wxEVT_LIST_ITEM_DESELECTED );
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue