]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't define wxADJUST_MINSIZE if it had been already defined.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Apr 2010 20:52:59 +0000 (20:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Apr 2010 20:52:59 +0000 (20:52 +0000)
Defining wxADJUST_MINSIZE as 0 may be a simple way to make the old code to
compile and while it works without WXWIN_COMPATIBILITY_2_8 it paradoxically
doesn't work with it because this results in errors when wxADJUST_MINSIZE is
defined as 0 by wx itself.

Avoid this problem by only defining wxADJUST_MINSIZE ourselves if it hadn't
been defined yet.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/defs.h

index b1e7f2062f8f588fccab2aff33c2cdb98f803667..4a8967ba85b630b32dbae3e4eb67ec7ab425681c 100644 (file)
@@ -1495,8 +1495,11 @@ enum wxAlignment
 /* misc. flags for wxSizer items */
 enum wxSizerFlagBits
 {
-    /* for compatibility only, default now, don't use explicitly any more */
-#if WXWIN_COMPATIBILITY_2_8
+    // wxADJUST_MINSIZE doesn't do anything any more but we still define it for
+    // compatibility. Notice that it may be also predefined (as 0, hopefully)
+    // in the user code in order to use it even in !WXWIN_COMPATIBILITY_2_8
+    // builds so don't redefine it in such case.
+#if WXWIN_COMPATIBILITY_2_8 && !defined(wxADJUST_MINSIZE)
     wxADJUST_MINSIZE               = 0,
 #endif
     wxFIXED_MINSIZE                = 0x8000,