Changeset 25ccf33 in sasview for guiframe


Ignore:
Timestamp:
May 21, 2009 6:08:48 AM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
588f84f
Parents:
b0eee0f0
Message:

load copy of data

Location:
guiframe
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • guiframe/data_loader.py

    r5ee2306 r25ccf33  
    103103            dxl = None 
    104104            dxw = None 
    105         ## data 's name 
    106         if output.filename==None: 
    107             output.filename=str(filename) 
     105        
    108106             
    109107        ## Creating a Data2D with output 
     
    130128        ## source will request in dataLoader .manipulation module 
    131129        new_plot.source=output.source 
     130        ## data 's name 
     131        if output.filename==None: 
     132            output.filename=str(filename) 
    132133        ## name of the data allow to differentiate data when plotted 
    133134        name= output.filename 
    134          
     135        if not name in parent.indice_load_data.keys(): 
     136            parent.indice_load_data[name]=0 
     137        else: 
     138            ## create a copy of the loaded data 
     139            parent.indice_load_data[name]+=1 
     140            name = name +"(copy %i)"%parent.indice_load_data[name] 
     141             
    135142        new_plot.name = name 
    136143        ## allow to highlight data when plotted 
     
    172179             
    173180            name= str(item.run[0]) 
    174              
     181            if not name in parent.indice_load_data.keys(): 
     182                parent.indice_load_data[name]=0 
     183            else: 
     184                ## create a copy of the loaded data 
     185                parent.indice_load_data[name]+=1 
     186                name = name +"(copy %i)"%parent.indice_load_data[name] 
     187                 
    175188            new_plot.name = name 
    176189            new_plot.interactive = True 
  • guiframe/gui_manager.py

    rb0eee0f0 r25ccf33  
    237237        ## list of open file with name form menu 
    238238        #self._saveOpenData() 
     239        ## Dictionary of open file where keys are filename  and values are number of copy of data plotted 
     240        ## using the same loaded file  
     241        self.indice_load_data={} 
    239242        # Register the close event so it calls our own method 
    240243        wx.EVT_CLOSE(self, self._onClose) 
     
    805808                self._default_save_location = os.path.dirname(path) 
    806809                
    807                 self.n_fileOpen += 1 
     810                #self.n_fileOpen += 1 
    808811                if self.n_fileOpen==1: 
    809812                    pos= self.filemenu.GetMenuItemCount()-1 
Note: See TracChangeset for help on using the changeset viewer.