Ignore:
Timestamp:
Aug 17, 2010 11:14:25 AM (14 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
4523b68
Parents:
5069a18
Message:

fixed minor bugs on set_state that did not totally update state information and not pass to state object.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • invariantview/perspectives/invariant/invariant_panel.py

    r9b18735 r645f9b6  
    165165        set state when loading it from a .inv/.svs file 
    166166        """ 
    167         if state == None or data == None: 
     167        if state == None and data == None: 
    168168            self.state = IState() 
     169        elif state == None or data == None: return 
    169170        else: 
    170171            self.new_state = True 
     
    173174            self.state = state  
    174175            self.state.file = data.name    
     176 
    175177            num = self.state.saved_state['state_num'] 
    176              
    177178            if num > 0 : 
    178179                self._undo_enable() 
     
    198199            #make sure that the data is reset (especially when loaded from a inv file) 
    199200            self.state.data = self._data 
     201 
    200202            self.new_state = False  
    201203            self.is_state_data = False 
     
    567569        #display a message 
    568570        self.set_message() 
    569          
     571 
    570572        # reset power_out to default to get ready for another '_on_text' 
    571573        if self.is_power_out == True: 
     
    579581        #enable the button_ok for more details 
    580582        self.button_details.Enable() 
    581  
     583         
    582584        if event != None:  
    583585            if not self.button_report.IsEnabled(): self.button_report.Enable(True) 
    584586            if not self.button_save.IsEnabled(): self.button_save.Enable(True) 
    585587            wx.PostEvent(self.parent, StatusEvent(status = '\nFinished invariant computation...')) 
    586          
     588             
     589 
    587590    def undo(self,event=None): 
    588591        """ 
Note: See TracChangeset for help on using the changeset viewer.