From ad63992e0f69a9d0c41e173644b8c0e612477022 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/trunk@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 9108095f93..26519adcbb 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -150,6 +150,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 -- 2.45.2