Display file name as root of workspace instead of "Workspace"
Close #8314, close #8315
This commit is contained in:
parent
b037bb5c95
commit
3f0627b75f
@ -398,7 +398,8 @@ bool ProjectPanel::openWorkSpace(const TCHAR *projectFileName)
|
||||
|
||||
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
|
||||
generic_string workspace = pNativeSpeaker->getAttrNameStr(PM_WORKSPACEROOTNAME, "ProjectManager", "WorkspaceRootName");
|
||||
HTREEITEM rootItem = _treeView.addItem(workspace.c_str(), TVI_ROOT, INDEX_CLEAN_ROOT);
|
||||
TCHAR * fileName = PathFindFileName(projectFileName);
|
||||
HTREEITEM rootItem = _treeView.addItem(fileName, TVI_ROOT, INDEX_CLEAN_ROOT);
|
||||
|
||||
for ( ; childNode ; childNode = childNode->NextSibling(TEXT("Project")))
|
||||
{
|
||||
@ -454,6 +455,9 @@ bool ProjectPanel::writeWorkSpace(TCHAR *projectFileName)
|
||||
if (!tvRoot)
|
||||
return false;
|
||||
|
||||
TCHAR * fileName = PathFindFileName(projectFileName);
|
||||
_treeView.renameItem(tvRoot, fileName);
|
||||
|
||||
for (HTREEITEM tvProj = _treeView.getChildFrom(tvRoot);
|
||||
tvProj != NULL;
|
||||
tvProj = _treeView.getNextSibling(tvProj))
|
||||
|
Loading…
Reference in New Issue
Block a user