]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch for generic file dialog Show()
authorRobert Roebling <robert@roebling.de>
Mon, 1 Mar 2004 22:54:20 +0000 (22:54 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 1 Mar 2004 22:54:20 +0000 (22:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/filedlgg.h
src/generic/filedlgg.cpp

index d8bea303d780a752c91d9806893ab6132382c5a6..003896977488f8f237ec4af88d061cd5557206c1 100644 (file)
@@ -68,6 +68,7 @@ public:
     // -------------------------------
 
     virtual int ShowModal();
+    virtual bool Show( bool show = true );
 
     void OnSelected( wxListEvent &event );
     void OnActivated( wxListEvent &event );
index 8c44509055be39697098f0f1934c09013cf967c5..83c51c893efc9b138dc180f3ebfd02d1be2c92e8 100644 (file)
@@ -1059,6 +1059,18 @@ int wxGenericFileDialog::ShowModal()
     return wxDialog::ShowModal();
 }
 
+bool wxGenericFileDialog::Show( bool show )
+{
+    if (show)
+    {
+        m_list->GoToDir(m_dir);
+        UpdateControls();
+        m_text->SetValue(m_fileName);
+    }
+
+    return wxDialog::Show( show );
+}
+
 void wxGenericFileDialog::DoSetFilterIndex(int filterindex)
 {
     wxString *str = (wxString*) m_choice->GetClientData( filterindex );