From e40e67e623d932dc376ca1f575e2f91797709ef8 Mon Sep 17 00:00:00 2001 From: upstream svn Date: Fri, 7 Oct 2011 21:13:12 +0000 Subject: [PATCH] Small fix for wx bug. Feel free to fix it on wx, send them a patch, #if out the block with the correct wx version, then remove the line in the future when we require that version... or be lazy like me. --- .svn-revision | 2 +- src/DirectoryTreeCtrl.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.svn-revision b/.svn-revision index 7ac176b2..db4e9b2a 100644 --- a/.svn-revision +++ b/.svn-revision @@ -1 +1 @@ -10628 +10629 diff --git a/src/DirectoryTreeCtrl.cpp b/src/DirectoryTreeCtrl.cpp index 3743182a..005aab2d 100644 --- a/src/DirectoryTreeCtrl.cpp +++ b/src/DirectoryTreeCtrl.cpp @@ -204,6 +204,10 @@ void CDirectoryTreeCtrl::AddChildItem(wxTreeItemId hBranch, const CPath& item) IMAGE_FOLDER, -1, new CItemData(item)); + // BUG: wxGenericTreeControl won't set text calculated sizes when the item is created in AppendItem. + // This causes asserts on Mac and possibly other systems, so we have to repeat setting the string here. + SetItemText(treeItem, item.GetPrintable()); + if (IsShared(fullPath)) { SetItemBold(treeItem, true); } -- 2.11.4.GIT