fixed bug with wxTR_EDIT_LABELS not working with xwTR_MULTIPLE (bug 622089)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d553ceb286
commit
df4ac4c7e9
@ -26,6 +26,7 @@ wxMSW:
|
||||
- support for accelerator keys in the owner drawn menus (Derry Bryson)
|
||||
- wxCaret::SetSize() doesn't hide the caret any longer as it used to
|
||||
- wxCheckListBox::Check() doesn't send CHECKLISTBOX_TOGGLE event any more
|
||||
- fixed bug with wxTR_EDIT_LABELS not workign with wxTR_MULTIPLE
|
||||
|
||||
All:
|
||||
|
||||
|
@ -2092,13 +2092,23 @@ long wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||
}
|
||||
else // normal click
|
||||
{
|
||||
// clear the selection and then let the default handler
|
||||
// do the job
|
||||
UnselectAll();
|
||||
// avoid doing anything if we click on the only
|
||||
// currently selected item
|
||||
wxArrayTreeItemIds selections;
|
||||
size_t count = GetSelections(selections);
|
||||
if ( count == 0 ||
|
||||
count > 1 ||
|
||||
HITEM(selections[0]) != htItem )
|
||||
{
|
||||
// clear the previously selected items
|
||||
UnselectAll();
|
||||
|
||||
// prevent the click from starting in-place editing
|
||||
// when there was no selection in the control
|
||||
TreeView_SelectItem(GetHwnd(), 0);
|
||||
// prevent the click from starting in-place editing
|
||||
// which should only happen if we click on the
|
||||
// already selected item (and nothing else is
|
||||
// selected)
|
||||
TreeView_SelectItem(GetHwnd(), 0);
|
||||
}
|
||||
|
||||
// reset on any click without Shift
|
||||
m_htSelStart = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user