]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/preferencesg.cpp
Return NULL from wxWindow::GetCapture() when the capture is being lost.
[wxWidgets.git] / src / generic / preferencesg.cpp
index 231185beed2424b70375655a2cc6ae7df8df303b..97236af30522c4a29a37a55e3b71a9edc60a3909 100644 (file)
@@ -3,7 +3,6 @@
 // Purpose:     Implementation of wxPreferencesEditor.
 // Author:      Vaclav Slavik
 // Created:     2013-02-19
-// RCS-ID:      $Id$
 // Copyright:   (c) 2013 Vaclav Slavik <vslavik@fastmail.fm>
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -23,6 +22,8 @@
     #pragma hdrstop
 #endif
 
+#if wxUSE_PREFERENCES_EDITOR
+
 #include "wx/private/preferences.h"
 
 #ifndef wxHAS_PREF_EDITOR_NATIVE
@@ -125,6 +126,8 @@ protected:
             dlg->AddPage(i->get());
         }
 
+        dlg->Fit();
+
         return dlg;
     }
 
@@ -207,8 +210,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 +256,5 @@ wxPreferencesEditorImpl* wxPreferencesEditorImpl::Create(const wxString& title)
 }
 
 #endif // !wxHAS_PREF_EDITOR_NATIVE
+
+#endif // wxUSE_PREFERENCES_EDITOR