]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/tbargtk.cpp
Realize remap code cleanup
[wxWidgets.git] / src / gtk / tbargtk.cpp
index a6920de7f98f4de5424c8a8eac037eb9bf4691a9..555803cd80603293e03826a3383c62960e5f057a 100644 (file)
@@ -428,15 +428,16 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
                 {
                     wxToolBarToolsList::compatibility_iterator node
                         = wxToolBarToolsList::compatibility_iterator();
-                    if ( pos ) node = m_tools.Item(pos - 1);
+                    if ( pos )
+                        node = m_tools.Item(pos - 1);
 
                     while ( node )
                     {
-                        wxToolBarTool *tool = (wxToolBarTool *)node->GetData();
-                        if ( !tool->IsRadio() )
+                        wxToolBarTool *toolNext = (wxToolBarTool *)node->GetData();
+                        if ( !toolNext->IsRadio() )
                             break;
 
-                        widget = tool->m_item;
+                        widget = toolNext->m_item;
 
                         node = node->GetPrevious();
                     }