Changeset 4da35bc in sasview for invariantview


Ignore:
Timestamp:
Aug 8, 2010 7:24:15 PM (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:
ef16f59
Parents:
028a0e8
Message:

improved theoryplot display from (inv file)

File:
1 edited

Legend:

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

    rb35d3d1 r4da35bc  
    2626from DataLoader.loader import Loader 
    2727from invariant_panel import InvariantPanel 
     28(InvStateUpdateEvent, EVT_STATE_UPDATE)   = wx.lib.newevent.NewEvent() 
    2829 
    2930class Plugin: 
     
    4748        #  for your plug-in. This defines your plug-in "perspective" 
    4849        self.perspective = [] 
    49          
    50         self.state_reader = None    
     50        #default state objects 
     51        self.state_reader = None  
     52        self.temp_state = None  
     53        self.__data = None  
    5154        """ 
    5255        # Create a CanSAS/Pr reader 
     
    9598        #add error back to the data 
    9699        self.parent.Bind(ERR_DATA, self._on_data_error) 
    97          
     100        self.parent.Bind(EVT_STATE_UPDATE, self.on_set_state_helper) 
    98101         
    99102        self.invariant_panel = InvariantPanel(parent=self.parent) 
     
    266269        :param state: State object 
    267270        """ 
     271        self.temp_state = None 
    268272        try: 
    269273            if datainfo is None: 
     
    282286            # Make sure the user sees the invariant panel after loading 
    283287            self.parent.set_perspective(self.perspective) 
    284             self.invariant_panel.set_state(state=temp_state,data=self.__data)          
     288            self.temp_state = temp_state 
     289            #self.invariant_panel.set_state(state=temp_state,data=self.__data)          
    285290 
    286291        except: 
    287292            logging.error("invariant.set_state: %s" % sys.exc_value) 
    288  
     293             
     294    def on_set_state_helper(self,event=None): 
     295        """ 
     296        """ 
     297        self.invariant_panel.set_state(state=self.temp_state,data=self.__data) 
     298        self.temp_state = None 
    289299         
    290300    def plot_theory(self, data=None, name=None): 
Note: See TracChangeset for help on using the changeset viewer.