]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed majorDim == 0 problem in wxGTK::wxRadioBox
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 25 Nov 2000 22:23:44 +0000 (22:23 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 25 Nov 2000 22:23:44 +0000 (22:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/radiobox.cpp
src/gtk1/radiobox.cpp

index fe7709a31dfc489de783265a334fc25dc364056f..9030add731f2610d36027d5fccb7d48a7cc12bb9 100644 (file)
@@ -187,7 +187,9 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
 
     m_widget = gtk_frame_new( title.mbc_str() );
 
-    m_majorDim = majorDim;
+    // majorDim may be 0 if all trailing parameters were omitted, so don't
+    // assert here but just use the correct value for it
+    m_majorDim = majorDim == 0 ? n : majorDim;
 
     GtkRadioButton *m_radio = (GtkRadioButton*) NULL;
 
index fe7709a31dfc489de783265a334fc25dc364056f..9030add731f2610d36027d5fccb7d48a7cc12bb9 100644 (file)
@@ -187,7 +187,9 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
 
     m_widget = gtk_frame_new( title.mbc_str() );
 
-    m_majorDim = majorDim;
+    // majorDim may be 0 if all trailing parameters were omitted, so don't
+    // assert here but just use the correct value for it
+    m_majorDim = majorDim == 0 ? n : majorDim;
 
     GtkRadioButton *m_radio = (GtkRadioButton*) NULL;