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