Changeset 12db2db6 in sasview for src/sas/qtgui/MainWindow
- Timestamp:
- Sep 7, 2018 10:25:19 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 2f14b5d, 0101c9f
- Parents:
- 339e22b (diff), f0365a2e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Location:
- src/sas/qtgui/MainWindow
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/DataExplorer.py
r339e22b r12db2db6 560 560 # Now query the model item for available plots 561 561 plots = GuiUtils.plotsFromFilename(filename, model) 562 ids_keys = list(self.active_plots.keys())563 ids_vals = [val.data.id for val in self.active_plots.values()]564 562 565 563 new_plots = [] 566 564 for item, plot in plots.items(): 567 plot_id = plot.id 568 if plot_id in ids_keys: 569 self.active_plots[plot_id].replacePlot(plot_id, plot) 570 elif plot_id in ids_vals: 571 list(self.active_plots.values())[ids_vals.index(plot_id)].replacePlot(plot_id, plot) 572 else: 565 if not self.updatePlot(plot): 573 566 # Don't plot intermediate results, e.g. P(Q), S(Q) 574 match = GuiUtils.theory_plot_ID_pattern.match(plot _id)567 match = GuiUtils.theory_plot_ID_pattern.match(plot.id) 575 568 # 2nd match group contains the identifier for the intermediate result, if present (e.g. "[P(Q)]") 576 569 if match and match.groups()[1] != None: … … 706 699 self.active_plots[plot_set.id] = old_plot 707 700 708 def updatePlot(self, new_data): 709 """ 710 Modify existing plot for immediate response 711 """ 712 data = new_data[0] 701 def updatePlot(self, data): 702 """ 703 Modify existing plot for immediate response and returns True. 704 Returns false, if the plot does not exist already. 705 """ 706 try: # there might be a list or a single value being passed 707 data = data[0] 708 except TypeError: 709 pass 713 710 assert type(data).__name__ in ['Data1D', 'Data2D'] 714 711 … … 719 716 if data_id in ids_keys: 720 717 self.active_plots[data_id].replacePlot(data_id, data) 718 return True 721 719 elif data_id in ids_vals: 722 720 list(self.active_plots.values())[ids_vals.index(data_id)].replacePlot(data_id, data) 721 return True 722 return False 723 723 724 724 def chooseFiles(self): -
src/sas/qtgui/MainWindow/GuiManager.py
rf84d793 r339e22b 422 422 self._workspace.actionExcel.triggered.connect(self.actionExcel) 423 423 self._workspace.actionLatex.triggered.connect(self.actionLatex) 424 425 424 # View 426 425 self._workspace.actionShow_Grid_Window.triggered.connect(self.actionShow_Grid_Window) … … 452 451 self._workspace.actionManage_Custom_Models.triggered.connect(self.actionManage_Custom_Models) 453 452 self._workspace.actionAddMult_Models.triggered.connect(self.actionAddMult_Models) 453 self._workspace.actionEditMask.triggered.connect(self.actionEditMask) 454 454 455 # Window 455 456 self._workspace.actionCascade.triggered.connect(self.actionCascade) … … 781 782 self.add_mult_editor.show() 782 783 784 def actionEditMask(self): 785 786 self.communicate.extMaskEditorSignal.emit() 787 783 788 #============ ANALYSIS ================= 784 789 def actionFitting(self): -
src/sas/qtgui/MainWindow/UI/MainWindowUI.ui
rdda8f16 r339e22b 113 113 <addaction name="actionManage_Custom_Models"/> 114 114 <addaction name="actionAddMult_Models"/> 115 <addaction name="separator"/> 116 <addaction name="EditMask"/> 115 117 </widget> 116 118 <widget class="QMenu" name="menuWindow"> … … 413 415 </property> 414 416 </action> 417 <action name="EditMask"> 418 <property name="text"> 419 <string>Edit Mask</string> 420 </property> 421 </action> 415 422 <action name="actionCascade"> 416 423 <property name="text">
Note: See TracChangeset
for help on using the changeset viewer.