From 46888bb4f35bb7186bfb07a8853d6174ba235354 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sat, 29 Oct 2011 00:03:02 +0000 Subject: [PATCH] [BUG_FIXED] Fix Project Manager's "Open Workspace" and "Reload Workspace" commands bug - without removing the old Workspace. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@832 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp index 1ccd2dac4..b1dcb78d0 100644 --- a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp +++ b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp @@ -293,6 +293,7 @@ bool ProjectPanel::openWorkSpace(const TCHAR *projectFileName) if (!::PathFileExists(projectFileName)) return false; + _treeView.removeAllItems(); _workSpaceFilePath = projectFileName; NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker(); @@ -316,8 +317,8 @@ void ProjectPanel::newWorkSpace() NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance())->getNativeLangSpeaker(); generic_string workspace = pNativeSpeaker->getProjectPanelLangStr("WorkspaceRootName", PM_WORKSPACEROOTNAME); _treeView.addItem(workspace.c_str(), TVI_ROOT, INDEX_CLEAN_ROOT); - setWorkSpaceDirty(false); - _workSpaceFilePath = TEXT(""); + setWorkSpaceDirty(false); + _workSpaceFilePath = TEXT(""); } bool ProjectPanel::saveWorkSpace()