]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/progdlgg.cpp
Ensure there is valid context for DrawRectangle
[wxWidgets.git] / src / generic / progdlgg.cpp
index fad7b159f5c3bc92b88228ed685b0da5e0698eb0..7f48ba31f331e4748683bf4f9c8f07800de91f1f 100644 (file)
@@ -146,12 +146,19 @@ wxGenericProgressDialog::wxGenericProgressDialog(const wxString& title,
     Create( title, message, maximum, parent, style );
 }
 
     Create( title, message, maximum, parent, style );
 }
 
+void wxGenericProgressDialog::SetTopParent(wxWindow* parent)
+{
+    m_parentTop = GetParentForModalDialog(parent, GetWindowStyle());
+}
+
 bool wxGenericProgressDialog::Create( const wxString& title,
                                       const wxString& message,
                                       int maximum,
                                       wxWindow *parent,
                                       int style )
 {
 bool wxGenericProgressDialog::Create( const wxString& title,
                                       const wxString& message,
                                       int maximum,
                                       wxWindow *parent,
                                       int style )
 {
+    SetTopParent(parent);
+
     m_parentTop = wxGetTopLevelParent(parent);
     m_pdStyle = style;
 
     m_parentTop = wxGetTopLevelParent(parent);
     m_pdStyle = style;