X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..e964136c08cb6ebf66e8778d0aab737fe8d17f67:/src/common/docmdi.cpp diff --git a/src/common/docmdi.cpp b/src/common/docmdi.cpp index 4d6141dd8c..281953afa2 100644 --- a/src/common/docmdi.cpp +++ b/src/common/docmdi.cpp @@ -165,11 +165,9 @@ void wxDocMDIChildFrame::OnCloseWindow(wxCloseEvent& event) // ...since it will be deleted by wxWindows if we return TRUE. if (m_childView) { - bool ans = FALSE; - if (!event.CanVeto()) - ans = TRUE; // Must delete. - else - ans = m_childView->Close(FALSE); // FALSE means don't delete associated window + bool ans = event.CanVeto() + ? m_childView->Close(FALSE) // FALSE means don't delete associated window + : TRUE; // Must delete. if (ans) {