Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/invariant/invariant_panel.py

    rc12f9b4 r654e8e0  
    250250 
    251251            num = self.state.saved_state['state_num'] 
    252             if num > 0: 
     252            if int(num) > 0: 
    253253                self._set_undo_flag(True) 
    254             if num < len(state.state_list) - 1: 
     254            if int(num) < len(state.state_list) - 1: 
    255255                self._set_redo_flag(True) 
    256256 
     
    830830        """ 
    831831        try: 
    832             attr = getattr(self, key) 
     832            if key in ['compute_num', 'file', 'is_time_machine', 'state_num']: 
     833                return 
     834            else: 
     835                attr = getattr(self, key) 
    833836            if attr.__class__.__name__ == "StaticText": 
    834837                return 
    835             if type(value) is not bool: 
     838            if value in ["True", "False", True, False]: 
     839                value = bool(value) 
     840            else: 
    836841                value = str(value) 
    837842            attr.SetValue(value) 
     
    18601865                                   (self.button_calculate, 0, 
    18611866                                    wx.RIGHT | wx.TOP | wx.BOTTOM, 10), 
    1862                                    (self.button_help, 0,  
     1867                                   (self.button_help, 0, 
    18631868                                    wx.RIGHT | wx.TOP | wx.BOTTOM, 10),]) 
    18641869    def _do_layout(self): 
     
    18821887        self.SetSizer(self.main_sizer) 
    18831888        self.SetAutoLayout(True) 
    1884          
     1889 
    18851890    def on_help(self, event): 
    18861891        """ 
    1887         Bring up the Invariant Documentation whenever the HELP button is  
     1892        Bring up the Invariant Documentation whenever the HELP button is 
    18881893        clicked. 
    18891894 
Note: See TracChangeset for help on using the changeset viewer.