It works.... with some modifications....
Index: src/sdk/projectmanager.cpp
===================================================================
--- src/sdk/projectmanager.cpp (revision 5742)
+++ src/sdk/projectmanager.cpp (working copy)
@@ -1754,12 +1754,18 @@
if (ftd->GetProject() != m_pActiveProject)
{
SetProject(ftd->GetProject(), false);
- // prevent item expand state toggle when project is activated
- #ifdef __WXMSW__
- // toggle it one time so that it is toggled back by wx
- m_pTree->IsExpanded(id) ? m_pTree->Collapse(id) : m_pTree->Expand(id);
- #endif
}
+ // prevent item expand state toggle when project is activated
+ // toggle it one time so that it is toggled back by wx
+ m_pTree->IsExpanded(id) ? m_pTree->Collapse(id) : m_pTree->Expand(id);
+ }
+ else if (ftd && (ftd->GetKind() == FileTreeData::ftdkVirtualGroup || ftd->GetKind() == FileTreeData::ftdkFolder))
+ {
+ m_pTree->IsExpanded(id) ? m_pTree->Collapse(id) : m_pTree->Expand(id);
+ }
+ else if (!ftd && m_pWorkspace)
+ {
+ m_pTree->IsExpanded(m_TreeRoot) ? m_pTree->Collapse(m_TreeRoot) : m_pTree->Expand(m_TreeRoot);
}
else
DoOpenSelectedFile();
Best regards
p.s. blueshake, please call svn diff from the root of the project, so the patches are easier to apply
p.s.s. guards should be place only if the wx docs say that the used API is platform specific... in the above code non-win32 users won't be able to test your work