X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4c51a665c649f7579fb39e62070cef4f66b3210d..7d6a4d96961eac84d05db8bb24c64d39003f6e54:/src/generic/treectlg.cpp?ds=sidebyside diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index a857c843b9..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)