Fix Reload Workspace not working

In case of reloading, openWorkSpace() needs to be called forced=true always.

Fix #11551, close #15946
This commit is contained in:
notdodgeball 2024-12-12 17:32:57 -03:00 committed by Don Ho
parent 471a308bca
commit 06a03ea41e

View File

@ -1073,7 +1073,6 @@ void ProjectPanel::popupMenuCmd(int cmdID)
case IDM_PROJECT_RELOADWS:
{
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
bool forceOpen = false;
if (_isDirty)
{
int res = pNativeSpeaker->messageBox("ProjectPanelReloadDirty",
@ -1082,11 +1081,7 @@ void ProjectPanel::popupMenuCmd(int cmdID)
L"Reload Workspace",
MB_YESNO | MB_ICONQUESTION | MB_APPLMODAL);
if (res == IDYES)
{
forceOpen = true;
}
else if (res == IDNO)
if (res == IDNO)
{
return;
}
@ -1094,7 +1089,7 @@ void ProjectPanel::popupMenuCmd(int cmdID)
if (doesFileExist(_workSpaceFilePath.c_str()))
{
openWorkSpace(_workSpaceFilePath.c_str(), forceOpen);
openWorkSpace(_workSpaceFilePath.c_str(), true);
}
else
{