]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/preferencesg.cpp
Fix build with wxUSE_FFILE=0.
[wxWidgets.git] / src / generic / preferencesg.cpp
index 231185beed2424b70375655a2cc6ae7df8df303b..cd846713daebd4d647eb7ae097bd322b771c7480 100644 (file)
@@ -23,6 +23,8 @@
     #pragma hdrstop
 #endif
 
+#if wxUSE_PREFERENCES_EDITOR
+
 #include "wx/private/preferences.h"
 
 #ifndef wxHAS_PREF_EDITOR_NATIVE
@@ -125,6 +127,8 @@ protected:
             dlg->AddPage(i->get());
         }
 
+        dlg->Fit();
+
         return dlg;
     }
 
@@ -207,8 +211,6 @@ public:
         m_dlg = dlg.get();
         wxON_BLOCK_EXIT_NULL(m_dlg);
 
-        dlg->Fit();
-
         // Restore the previously selected page, if any.
         if ( m_currentPage != -1 )
             dlg->SelectPage(m_currentPage);
@@ -255,3 +257,5 @@ wxPreferencesEditorImpl* wxPreferencesEditorImpl::Create(const wxString& title)
 }
 
 #endif // !wxHAS_PREF_EDITOR_NATIVE
+
+#endif // wxUSE_PREFERENCES_EDITOR