From 5b2e23bff681066c84c85399ed9a3183a7a40465 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Mon, 25 Apr 2005 19:13:28 +0000 Subject: [PATCH] Prevent unnecessary assert when someone tries to move the native file dialog. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/filedlg.h | 7 +++++++ include/wx/gtk1/filedlg.h | 7 +++++++ src/gtk/filedlg.cpp | 8 ++++++++ src/gtk1/filedlg.cpp | 8 ++++++++ 4 files changed, 30 insertions(+) diff --git a/include/wx/gtk/filedlg.h b/include/wx/gtk/filedlg.h index c448dbb3bd..31b895da18 100644 --- a/include/wx/gtk/filedlg.h +++ b/include/wx/gtk/filedlg.h @@ -56,6 +56,13 @@ public: //private: bool m_destroyed_by_delete; + // override this from wxTLW since the native + // form doesn't have any m_wxwindow + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + private: DECLARE_DYNAMIC_CLASS(wxFileDialog) DECLARE_EVENT_TABLE() diff --git a/include/wx/gtk1/filedlg.h b/include/wx/gtk1/filedlg.h index c448dbb3bd..31b895da18 100644 --- a/include/wx/gtk1/filedlg.h +++ b/include/wx/gtk1/filedlg.h @@ -56,6 +56,13 @@ public: //private: bool m_destroyed_by_delete; + // override this from wxTLW since the native + // form doesn't have any m_wxwindow + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + + private: DECLARE_DYNAMIC_CLASS(wxFileDialog) DECLARE_EVENT_TABLE() diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index 61925cde04..04040bd548 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -267,6 +267,14 @@ bool wxFileDialog::Show( bool show ) return wxGenericFileDialog::Show( show ); } +void wxFileDialog::DoSetSize(int x, int y, int width, int height, int sizeFlags ) +{ + if (!m_wxwindow) + return; + else + wxGenericFileDialog::DoSetSize( x, y, width, height, sizeFlags ); +} + wxString wxFileDialog::GetPath() const { #ifdef __WXGTK24__ diff --git a/src/gtk1/filedlg.cpp b/src/gtk1/filedlg.cpp index 61925cde04..04040bd548 100644 --- a/src/gtk1/filedlg.cpp +++ b/src/gtk1/filedlg.cpp @@ -267,6 +267,14 @@ bool wxFileDialog::Show( bool show ) return wxGenericFileDialog::Show( show ); } +void wxFileDialog::DoSetSize(int x, int y, int width, int height, int sizeFlags ) +{ + if (!m_wxwindow) + return; + else + wxGenericFileDialog::DoSetSize( x, y, width, height, sizeFlags ); +} + wxString wxFileDialog::GetPath() const { #ifdef __WXGTK24__ -- 2.45.2