Ignore:
Timestamp:
03/25/13 13:34:46 (13 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fixed 'ToolBox.exclusive' property update.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/gui/toolbox.py

    r11417 r11441  
    6262    def setNativeStyling(self, state): 
    6363        """ 
    64         Render tab buttons as native :class:`QToolButtons`. 
    65         If set to `False` (default) the button is pained using a 
    66         custom routine. 
     64        Render tab buttons as native (or css styled) :class:`QToolButtons`. 
     65        If set to `False` (default) the button is pained using a custom 
     66        paint routine. 
    6767 
    6868        """ 
     
    231231            self.__tabActionGroup.setExclusive(exclusive) 
    232232            checked = self.__tabActionGroup.checkedAction() 
     233            if checked is None: 
     234                # The action group can be out of sync with the actions state 
     235                # when switching between exclusive states. 
     236                actions_checked = [page.action for page in self.__pages 
     237                                   if page.action.isChecked()] 
     238                if actions_checked: 
     239                    checked = actions_checked[0] 
     240 
    233241            # Trigger/toggle remaining open pages 
    234242            if exclusive and checked is not None: 
Note: See TracChangeset for help on using the changeset viewer.