From 7e8f47db5edac820e17a03ebfc75d6e82d16791c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 2 Aug 2008 15:59:13 +0000 Subject: [PATCH] ensure that one of wxRA_SPECIFY_{COLS,ROWS} is set in the radiobox style, otherwise layout code doesn't work correctly and this can easily happen if the radiobox is created from an XRC file not specifying its style at all git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/radiobox.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index 5f527f323b..354a64acec 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -149,6 +149,11 @@ bool wxRadioBox::Create(wxWindow *parent, if ( !wxStaticBox::Create(parent, id, title, pos, size, style, name) ) return false; + // the code elsewhere in this file supposes that either wxRA_SPECIFY_COLS + // or wxRA_SPECIFY_ROWS is set, ensure that this is indeed the case + if ( !(style & (wxRA_SPECIFY_ROWS | wxRA_SPECIFY_COLS)) ) + style |= wxRA_SPECIFY_COLS; + #if wxUSE_VALIDATORS SetValidator(val); #else