From 9084dd3fb04cc8623b5a77e7c58fa2f66a6128a8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 16 Jan 2014 21:44:55 +0000 Subject: [PATCH] Ensure that the help viewer keeps running as long as its main frame is opened. Do prevent the app from exiting when the help frame is shown in the special case of the help viewer application where the default behaviour of exiting the application when only the help window remains open is inappropriate and results in unexpected program exit if we open and then close any dialog, e.g. from the help frame toolbar. Even though the previous commit actually already fixed the problem in the current code, still apply this fix as well, just in case we can (or could, in the future) should any dialogs with NULL parent in this program. Closes #15880. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75634 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/helpview/src/helpview.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/helpview/src/helpview.cpp b/utils/helpview/src/helpview.cpp index 4b445e0065..6e28684573 100644 --- a/utils/helpview/src/helpview.cpp +++ b/utils/helpview/src/helpview.cpp @@ -193,6 +193,12 @@ bool hvApp::OnInit() m_helpController = new wxHtmlHelpController( istyle ); + // By default, the application doesn't continue running if only the help + // frame remains. This makes sense for the programs doing something else + // and also showing help, but as this one only shows help, we should keep + // it running as long as this frame is opened. + m_helpController->SetShouldPreventAppExit(true); + if ( !hasWindowName ) { titleFormat = wxT("Help: %s") ;