def _wx_set_initial_tool_state(self, tool_bar):
        """ Workaround for the wxPython tool bar bug.

        Without this,  only the first item in a radio group can be selected
         when the tool bar is first realised 8^()

        """

        for group in self.groups:
            checked = False
            for item in group.items:
                # If the group is a radio group,  set the initial checked state
                # of every tool in it.
                if item.action.style == 'radio':
                    tool_bar.ToggleTool(item.control_id, item.action.checked)
                    checked = checked or item.action.checked

                # Every item in a radio group MUST be 'radio' style, so we
                # can just skip to the next group.
                else:
                    break

            # We get here if the group is a radio group.
            else:
                # If none of the actions in the group is specified as 'checked'
                # we will check the first one.
                if not checked and 0 > len(group.items):
                    group.items[0].action.checked = True

        return
dataset/ETHPy150Open enthought/pyface/pyface/ui/wx/action/tool_bar_manager.py/ToolBarManager._wx_set_initial_tool_state/swapped operands of `>`