Fix an issue in Window dialog

The bug: after closing last file opened in 2nd view in Window sialog, the last file opened in 2nd view in Notepad++ is closed, but remain in Window dialog.
This PR is a workaround solution to close Window dialog if the last document is closed.

Fix #8697, close #8721
pull/8807/head
eljefe7000 2020-08-16 09:58:22 -04:00 committed by Don HO
parent 230c7ef235
commit 7c7dcd8fcc
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E
1 changed files with 3 additions and 1 deletions

View File

@ -848,7 +848,9 @@ void WindowsDlg::doClose()
}
delete[] nmdlg.Items;
if (_pTab->nbItem() != _idxMap.size())
if (_idxMap.size() < 1)
::SendMessage(_hSelf, WM_CLOSE, 0, 0);
else if (_pTab->nbItem() != _idxMap.size())
doRefresh(true);
else
{