From d240c1f20f902991fea5b0ec59da23d70e85922c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 29 Oct 2017 19:05:31 +0100 Subject: [PATCH] Just use wxGenericProgressDialog::m_parentTop directly Remove another redundant line of code from wxGenericProgressDialog:: Create(), there is no need to call GetParentForModalDialog() again when we just did it to initialize m_parentTop, just use the latter directly. --- src/generic/progdlgg.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index 712d07519c..ff6ce27983 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -146,10 +146,7 @@ bool wxGenericProgressDialog::Create( const wxString& title, m_pdStyle = style; - wxWindow* const - realParent = GetParentForModalDialog(parent, GetWindowStyle()); - - if (!wxDialog::Create(realParent, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, GetWindowStyle())) + if (!wxDialog::Create(m_parentTop, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, GetWindowStyle())) return false; SetMaximum(maximum);