Fix 'cppkore' close event bug

Fix close callback getting called recursively when application gets closed by user. The initial call originated from 'Form::WmClose', second call from 'Form::CheckCloseDialog'. The original call should set the 'called' flag, but never did.
This commit is contained in:
Kawe Mazidjatari 2023-03-23 23:43:05 +01:00
parent b169a78542
commit 1758abb0aa

View File

@ -718,6 +718,11 @@ namespace Forms
{
OnClosing(EventArgs);
OnFormClosing(EventArgs);
if (EventArgs->Cancel)
_DialogResult = DialogResult::None;
else
SetCalledClosing(true);
}
if (Msg.Msg == WM_QUERYENDSESSION)