]> git.saurik.com Git - wxWidgets.git/commitdiff
don't duplicate wxGetTopLevelParent() code in wxHtmlHelpController::FindTopLevelWindow()
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 4 May 2009 10:23:52 +0000 (10:23 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 4 May 2009 10:23:52 +0000 (10:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60514 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/helpctrl.cpp

index 28e07592b7b2fa1bad8fafcfbc2db1be91cd1372..c70f5f24aa4176e461f9519bc1dadb3244ffcc25 100644 (file)
@@ -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)