Ignore:
Timestamp:
Aug 9, 2010 11:38:42 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:
e683abb
Parents:
4da35bc
Message:

Now it saves and opens all states of fitv taps.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/pagestate.py

    r4da35bc ref16f59  
    11391139                    if max_char < 0: 
    11401140                        max_char = len(state.file) 
    1141                     state.file = state.file[0:max_char] +' [' + time_str + ']' 
     1141                    original_fname = state.file[0:max_char] 
     1142                    state.file = original_fname +' [' + time_str + ']' 
    11421143                    
    11431144                         
     
    11491150                    state.data.name = output[ind].filename #state.data_name 
    11501151                    state.data.id = state.data_id 
    1151                     state.data.id = state.data_id 
    11521152                    if state.is_data is not None: 
    11531153                        state.data.is_data = state.is_data 
    1154                     state.data.group_id = output[ind].filename 
    1155                    
    1156                     # make sure to put run name if none 
    1157                     #if output[ind].run == None or output[ind].run ==[]: 
    1158                     #    exec 'output[%d].run = [output[%d].filename]'% (ind,ind) 
     1154                    if output[ind].run_name is not None and len(output[ind].run_name) != 0 : 
     1155                        name = output[ind].run_name 
     1156                    else:  
     1157                        name=original_fname 
     1158                    state.data.group_id = name 
     1159                    #store state in fitting 
    11591160                    self.call_back(state=state, datainfo=output[ind]) 
    1160                 return output[ind] 
     1161                     
     1162                return output 
    11611163               
    11621164        except: 
     
    11761178             
    11771179            # Add fitting information to the XML document 
    1178             self.write_toXML(datainfo, fitstate) 
     1180            doc = self.write_toXML(datainfo, fitstate) 
    11791181            # Write the XML document 
    11801182            fd = open(filename, 'w') 
Note: See TracChangeset for help on using the changeset viewer.