X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6485c8d7fbede5752cd3f763d0d5ccf9b0b51f2e..7d6a4d96961eac84d05db8bb24c64d39003f6e54:/src/generic/treectlg.cpp?ds=sidebyside diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 0e38a10f37..b11fd4b449 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -441,7 +441,7 @@ wxTreeTextCtrl::wxTreeTextCtrl(wxGenericTreeCtrl *owner, rect.y -= 2; rect.width += 8; rect.height += 4; -#elif defined(__WXMAC__) +#elif defined(wxOSX_USE_CARBON) && wxOSX_USE_CARBON int bestHeight = GetBestSize().y - 8; if ( rect.height > bestHeight ) { @@ -997,7 +997,7 @@ bool wxGenericTreeCtrl::Create(wxWindow *parent, #endif if ( !wxControl::Create( parent, id, pos, size, - style|wxHSCROLL|wxVSCROLL, + style|wxHSCROLL|wxVSCROLL|wxWANTS_CHARS, validator, name ) ) return false; @@ -2054,7 +2054,8 @@ wxGenericTreeCtrl::TagAllChildrenUntilLast(wxGenericTreeItem *crt_item, if (crt_item==last_item) return true; - if (crt_item->HasChildren()) + // We should leave the not shown children of collapsed items alone. + if (crt_item->HasChildren() && crt_item->IsExpanded()) { wxArrayGenericTreeItems& children = crt_item->GetChildren(); size_t count = children.GetCount(); @@ -2878,7 +2879,7 @@ wxGenericTreeCtrl::PaintLevel(wxGenericTreeItem *item, yOrigin = abs(yOrigin); GetClientSize(&width, &height); - // Move end points to the begining/end of the view? + // Move end points to the beginning/end of the view? if (y_mid < yOrigin) y_mid = yOrigin; if (oldY > yOrigin + height) @@ -3699,7 +3700,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) event.Skip(!GetEventHandler()->ProcessEvent(nevent)); // Consistent with MSW (for now), send the ITEM_MENU *after* - // the RIGHT_CLICK event. TODO: This behavior may change. + // the RIGHT_CLICK event. TODO: This behaviour may change. wxTreeEvent nevent2(wxEVT_COMMAND_TREE_ITEM_MENU, this, item); nevent2.m_pointDrag = CalcScrolledPosition(pt); GetEventHandler()->ProcessEvent(nevent2);