X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd365871aadca528e03f3b6bb8382a1fdf5f1817..c2f7cc71ef2188967e6a4dc90106fd716aa23be9:/src/html/helpctrl.cpp?ds=sidebyside 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)