Changeset 3fafe15 in sasview for sansview/perspectives
- Timestamp:
- Mar 10, 2011 11:53:39 AM (14 years ago)
- 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:
- e8bf1ed
- Parents:
- 003fa4e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitting.py
rfa65e99 r3fafe15 594 594 wx.PostEvent(self.parent, NewPlotEvent(id=id, 595 595 group_id=group_id, 596 remove=True))596 action='remove')) 597 597 598 598 def store_data(self, id, data=None, caption=None): … … 652 652 if group_id not in data.group_id: 653 653 data.group_id.append(group_id) 654 self.parent.update_data(prev_data=theory_data, new_data=data) 655 654 self.parent.update_data(prev_data=theory_data, new_data=data) 656 655 self.store_data(id=page.id, data=data, caption=page.window_name) 657 656 if self.sim_page is not None: … … 1087 1086 theory.ymin = ymin 1088 1087 theory.ymax = ymax 1089 theory.group_id = str(id) + "Model2D" 1090 theory.id = str(id) + "Mode2D" 1088 group_id = str(id) + " Model2D" 1089 if group_id not in theory.group_id: 1090 theory.group_id.append(group_id) 1091 theory.id = str(id) + " Model2D" 1091 1092 1092 1093 … … 1126 1127 new_plot.is_data = False 1127 1128 new_plot.id = str(id) + " Model1D" 1128 print "new_plot.id", new_plot.id1129 1129 1130 #find if this theory was already plotted and replace that plot given 1130 1131 #the same id … … 1133 1134 if theory_data is not None: 1134 1135 temp_id = theory_data.id 1135 print "theory_data id", temp_id1136 1136 new_plot.id = temp_id 1137 if toggle_mode_on: 1138 new_plot.id = str(id) + " Model" 1137 1139 1138 new_plot.name = model.name + " ["+ str(model.__class__.__name__)+ "]" 1140 1139 new_plot.xaxis(_xaxis, _xunit) 1141 1140 new_plot.yaxis(_yaxis, _yunit) 1141 if toggle_mode_on: 1142 new_plot.id = str(id) + " Model" 1143 wx.PostEvent(self.parent, 1144 NewPlotEvent(group_id=str(id) + " Model2D", 1145 action="Hide")) 1146 print "toggle model on -->1d" 1142 1147 self.page_finder[id].set_theory_data(new_plot) 1143 1148 if data is None: … … 1147 1152 else: 1148 1153 data_id = data.id 1154 1149 1155 self.parent.append_theory(data_id=data_id, 1150 1156 theory=new_plot, state=state) … … 1194 1200 else: 1195 1201 new_plot.id = str(id) + " Model2D" 1196 new_plot.group_id = str(id) + " Model2D" 1202 group_id = str(id) + " Model2D" 1203 if group_id not in new_plot.group_id: 1204 new_plot.group_id.append(group_id) 1197 1205 1198 1206 new_plot.x_bins = data.x_bins … … 1216 1224 theory_data = deepcopy(new_plot) 1217 1225 theory_data.name = "Unknown" 1226 if toggle_mode_on: 1227 new_plot.id = str(id) + " Model" 1228 wx.PostEvent(self.parent, 1229 NewPlotEvent(group_id=str(id) + " Model1D", 1230 action="Hide")) 1218 1231 self.page_finder[id].set_theory_data(theory_data) 1219 1232 … … 1224 1237 else: 1225 1238 data_id = data.id 1239 1226 1240 self.parent.append_theory(data_id=data_id, 1227 1241 theory=new_plot, state=state) 1228 if toggle_mode_on:1229 new_plot.id = str(id) + " Model"1230 1242 ## plot 1231 1243 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, 1232 title=new_plot.title))1244 title=new_plot.title)) 1233 1245 # Chisqr in fitpage 1234 1246 current_pg = self.fit_panel.get_page_by_id(id)
Note: See TracChangeset
for help on using the changeset viewer.