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:
Vadim Zeitlin
2003-01-02 20:21:41 +00:00
parent d553ceb286
commit df4ac4c7e9
2 changed files with 17 additions and 6 deletions

View File

@@ -26,6 +26,7 @@ wxMSW:
- support for accelerator keys in the owner drawn menus (Derry Bryson) - support for accelerator keys in the owner drawn menus (Derry Bryson)
- wxCaret::SetSize() doesn't hide the caret any longer as it used to - wxCaret::SetSize() doesn't hide the caret any longer as it used to
- wxCheckListBox::Check() doesn't send CHECKLISTBOX_TOGGLE event any more - wxCheckListBox::Check() doesn't send CHECKLISTBOX_TOGGLE event any more
- fixed bug with wxTR_EDIT_LABELS not workign with wxTR_MULTIPLE
All: All:

View File

@@ -2092,13 +2092,23 @@ long wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
} }
else // normal click else // normal click
{ {
// clear the selection and then let the default handler // avoid doing anything if we click on the only
// do the job // currently selected item
UnselectAll(); 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 // prevent the click from starting in-place editing
// when there was no selection in the control // which should only happen if we click on the
TreeView_SelectItem(GetHwnd(), 0); // already selected item (and nothing else is
// selected)
TreeView_SelectItem(GetHwnd(), 0);
}
// reset on any click without Shift // reset on any click without Shift
m_htSelStart = 0; m_htSelStart = 0;