[Commits] (jed) Fixes Bug#2444 (toolbar selection not correct on Mac after calling Realize a 2nd time). r=davids

commits at osafoundation.org commits at osafoundation.org
Tue Mar 8 12:13:11 PST 2005


Commit by: jed
Modified files:
internal/wxPython-2.5/src/mac/carbon/toolbar.cpp 1.4 1.5

Log message:
Fixes Bug#2444 (toolbar selection not correct on Mac after calling Realize a 2nd time). r=davids

ViewCVS links:
http://cvs.osafoundation.org/index.cgi/internal/wxPython-2.5/src/mac/carbon/toolbar.cpp.diff?r1=text&tr1=1.4&r2=text&tr2=1.5

Index: internal/wxPython-2.5/src/mac/carbon/toolbar.cpp
diff -u internal/wxPython-2.5/src/mac/carbon/toolbar.cpp:1.4 internal/wxPython-2.5/src/mac/carbon/toolbar.cpp:1.5
--- internal/wxPython-2.5/src/mac/carbon/toolbar.cpp:1.4	Tue Dec  7 17:29:38 2004
+++ internal/wxPython-2.5/src/mac/carbon/toolbar.cpp	Tue Mar  8 12:13:10 2005
@@ -4,7 +4,7 @@
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     04/01/98
-// RCS-ID:      $Id: toolbar.cpp,v 1.4 2004/12/08 01:29:38 davids Exp $
+// RCS-ID:      $Id: toolbar.cpp,v 1.5 2005/03/08 20:13:10 jed Exp $
 // Copyright:   (c) Stefan Csomor
 // Licence:     The wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -366,6 +366,21 @@
                     DoToggleTool(tool, true);
                 }
             }
+            else if (tool->IsToggled())
+            {
+                wxToolBarToolsList::compatibility_iterator nodePrev = node->GetPrevious();
+                while ( nodePrev )
+                {
+                    wxToolBarToolBase *tool = nodePrev->GetData();
+                    if ( !tool->IsButton() || (tool->GetKind() != wxITEM_RADIO) )
+                        break;
+                    if ( tool->Toggle(false) )
+                    {
+                        DoToggleTool(tool, false);
+                    }
+                    nodePrev = nodePrev->GetPrevious();
+                }
+            }
             isRadio = TRUE;
         }
         else



More information about the Commits mailing list