From 9df05aab59ad8ff0e3cf5556e8273c72c0fc5203 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 4 May 2009 10:23:52 +0000 Subject: [PATCH] don't duplicate wxGetTopLevelParent() code in wxHtmlHelpController::FindTopLevelWindow() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/helpctrl.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/html/helpctrl.cpp b/src/html/helpctrl.cpp index 28e07592b7..c70f5f24aa 100644 --- a/src/html/helpctrl.cpp +++ b/src/html/helpctrl.cpp @@ -115,12 +115,7 @@ void wxHtmlHelpController::SetTitleFormat(const wxString& title) // Find the top-most parent window wxWindow* wxHtmlHelpController::FindTopLevelWindow() { - wxWindow* parent = m_helpWindow; - while (parent && !parent->IsTopLevel()) - { - parent = parent->GetParent(); - } - return parent; + return wxGetTopLevelParent(m_helpWindow); } bool wxHtmlHelpController::AddBook(const wxFileName& book_file, bool show_wait_msg) -- 2.50.0