Fix "Reload Workspace" menu command not working issue

Now forces the workspace to be opened when the user accepts that reloading will discard all modifications

Fix #9350, close #9696
pull/9764/head
jofon 2021-03-24 15:48:41 +00:00 committed by Don HO
parent cae2f77daf
commit c29240d78a
1 changed files with 3 additions and 2 deletions

View File

@ -1098,6 +1098,7 @@ void ProjectPanel::popupMenuCmd(int cmdID)
case IDM_PROJECT_RELOADWS:
{
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
bool forceOpen = false;
if (_isDirty)
{
int res = pNativeSpeaker->messageBox("ProjectPanelReloadDirty",
@ -1108,7 +1109,7 @@ void ProjectPanel::popupMenuCmd(int cmdID)
if (res == IDYES)
{
// Do nothing
forceOpen = true;
}
else if (res == IDNO)
{
@ -1118,7 +1119,7 @@ void ProjectPanel::popupMenuCmd(int cmdID)
if (::PathFileExists(_workSpaceFilePath.c_str()))
{
openWorkSpace(_workSpaceFilePath.c_str());
openWorkSpace(_workSpaceFilePath.c_str(), forceOpen);
}
else
{