- fix: editor's inproject property not correctly setted (and may cause devcpp to crash when close project)
This commit is contained in:
parent
e6d4bdd43c
commit
ec458a880a
1
NEWS.md
1
NEWS.md
|
@ -25,6 +25,7 @@ Version 0.6.0
|
|||
- fix: editors disappeared when close/close all
|
||||
- implement: config shortcuts
|
||||
- implement: handle windows logout message
|
||||
- fix: editor's inproject property not correctly setted (and may cause devcpp to crash when close project)
|
||||
|
||||
Version 0.5.0
|
||||
- enhancement: support C++ using type alias;
|
||||
|
|
|
@ -2794,6 +2794,7 @@ void Editor::setInProject(bool newInProject)
|
|||
{
|
||||
if (mInProject == newInProject)
|
||||
return;
|
||||
mInProject = newInProject;
|
||||
if (mInProject) {
|
||||
initParser();
|
||||
} else {
|
||||
|
|
|
@ -29,6 +29,8 @@ public:
|
|||
bool WindowLogoutEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, long *result){
|
||||
MSG * pMsg = static_cast<MSG *>(message);
|
||||
if (pMsg->message == WM_QUERYENDSESSION) {
|
||||
if (pMsg->lParam == 0
|
||||
|| (pMsg->lParam & ENDSESSION_LOGOFF)) {
|
||||
if (!pMainWindow->close()) {
|
||||
*result = 0;
|
||||
} else {
|
||||
|
@ -36,6 +38,7 @@ bool WindowLogoutEventFilter::nativeEventFilter(const QByteArray &eventType, voi
|
|||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue