mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 05:45:00 +02:00
Project Workspace "Save a Copy As" confusion issue
Fix #13135, close #13303
This commit is contained in:
parent
0457a112c7
commit
2c6c556a3a
@ -384,7 +384,7 @@ bool ProjectPanel::saveWorkSpace()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProjectPanel::writeWorkSpace(const TCHAR *projectFileName)
|
bool ProjectPanel::writeWorkSpace(const TCHAR *projectFileName, bool doUpdateGUI)
|
||||||
{
|
{
|
||||||
//write <NotepadPlus>: use the default file name if new file name is not given
|
//write <NotepadPlus>: use the default file name if new file name is not given
|
||||||
const TCHAR * fn2write = projectFileName?projectFileName:_workSpaceFilePath.c_str();
|
const TCHAR * fn2write = projectFileName?projectFileName:_workSpaceFilePath.c_str();
|
||||||
@ -429,7 +429,10 @@ bool ProjectPanel::writeWorkSpace(const TCHAR *projectFileName)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
TCHAR * fileName = PathFindFileName(fn2write);
|
TCHAR * fileName = PathFindFileName(fn2write);
|
||||||
_treeView.renameItem(tvRoot, fileName);
|
if (doUpdateGUI)
|
||||||
|
{
|
||||||
|
_treeView.renameItem(tvRoot, fileName);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1194,7 +1197,7 @@ bool ProjectPanel::saveWorkSpaceAs(bool saveCopyAs)
|
|||||||
if (fn.empty())
|
if (fn.empty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!writeWorkSpace(fn.c_str()))
|
if (!writeWorkSpace(fn.c_str(), !saveCopyAs))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!saveCopyAs)
|
if (!saveCopyAs)
|
||||||
|
@ -125,7 +125,7 @@ protected:
|
|||||||
void recursiveAddFilesFrom(const TCHAR *folderPath, HTREEITEM hTreeItem);
|
void recursiveAddFilesFrom(const TCHAR *folderPath, HTREEITEM hTreeItem);
|
||||||
HTREEITEM addFolder(HTREEITEM hTreeItem, const TCHAR *folderName);
|
HTREEITEM addFolder(HTREEITEM hTreeItem, const TCHAR *folderName);
|
||||||
|
|
||||||
bool writeWorkSpace(const TCHAR *projectFileName = NULL);
|
bool writeWorkSpace(const TCHAR *projectFileName = NULL, bool doUpdateGUI = true);
|
||||||
generic_string getRelativePath(const generic_string & fn, const TCHAR *workSpaceFileName);
|
generic_string getRelativePath(const generic_string & fn, const TCHAR *workSpaceFileName);
|
||||||
void buildProjectXml(TiXmlNode *root, HTREEITEM hItem, const TCHAR* fn2write);
|
void buildProjectXml(TiXmlNode *root, HTREEITEM hItem, const TCHAR* fn2write);
|
||||||
NodeType getNodeType(HTREEITEM hItem);
|
NodeType getNodeType(HTREEITEM hItem);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user