From: Vadim Zeitlin Date: Mon, 4 May 2009 10:23:52 +0000 (+0000) Subject: don't duplicate wxGetTopLevelParent() code in wxHtmlHelpController::FindTopLevelWindow() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9df05aab59ad8ff0e3cf5556e8273c72c0fc5203 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 --- 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)