From d15946384a1265e832a96206187d5cd756ab0e77 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 16 Apr 2010 20:52:59 +0000 Subject: [PATCH] Don't define wxADJUST_MINSIZE if it had been already defined. 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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/wx/defs.h b/include/wx/defs.h index b1e7f2062f..4a8967ba85 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -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, -- 2.45.2