]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/radiobox.cpp
Fix for problem when Realize is re-called on a vertical toolbar, it
[wxWidgets.git] / src / gtk / radiobox.cpp
index d00e6cfc765b120fa3a90524e16c42d0e573f8e6..938fe515ca061bb7452faca17e9d88b033585244 100644 (file)
@@ -193,12 +193,11 @@ static void gtk_radiobutton_size_allocate( GtkWidget *widget,
                                            GtkAllocation * alloc,
                                            wxRadioBox *win )
 {
-    unsigned int n = 0;
     for ( wxRadioBoxButtonsInfoList::compatibility_iterator node = win->m_buttonsInfo.GetFirst();
           node;
-          node = node->GetNext(), n++ )
+          node = node->GetNext())
     {
-        if( widget == GTK_WIDGET(node->GetData()->button) )
+        if (widget == GTK_WIDGET(node->GetData()->button))
         {
             const wxPoint origin = win->GetPosition();
             wxRect rect = wxRect( alloc->x - origin.x, alloc->y - origin.y,
@@ -688,7 +687,7 @@ int wxRadioBox::GetItemFromPoint(const wxPoint& point) const
     for ( wxRadioBoxButtonsInfoList::compatibility_iterator
             node = m_buttonsInfo.GetFirst(); node; node = node->GetNext(), n++ )
     {
-        if ( m_buttonsInfo[n]->rect.Inside(pt) )
+        if ( m_buttonsInfo[n]->rect.Contains(pt) )
             return n;
     }