Changeset 8696721 in sasview for src/sas/qtgui/DataExplorer.py
- Timestamp:
- Dec 13, 2016 5:04:25 AM (8 years ago)
- Branches:
- 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
- Children:
- 0532d7c1
- Parents:
- 6b9d41d (diff), c3b2327 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/DataExplorer.py
r253e7170 r8696721 80 80 self.communicator.fileReadSignal.connect(self.loadFromURL) 81 81 self.communicator.activeGraphsSignal.connect(self.updateGraphCombo) 82 self.communicator.activeGraphName.connect(self.updatePlotName) 82 83 self.cbgraph.editTextChanged.connect(self.enableGraphCombo) 83 84 self.cbgraph.currentIndexChanged.connect(self.enableGraphCombo) … … 368 369 return new_item 369 370 371 def updatePlotName(self, name_tuple): 372 """ 373 Modify the name of the current plot 374 """ 375 old_name, current_name = name_tuple 376 ind = self.cbgraph.findText(old_name) 377 self.cbgraph.setCurrentIndex(ind) 378 self.cbgraph.setItemText(ind, current_name) 379 370 380 def updateGraphCombo(self, graph_list): 371 381 """ … … 411 421 raise AttributeError, msg 412 422 423 413 424 if plots and \ 414 hasattr(new_plot, 'data') and \415 len(new_plot.data.x) > 0:416 self.plotAdd(new_plot)425 hasattr(new_plot, 'data') and \ 426 isinstance(new_plot.data, Data1D): 427 self.plotAdd(new_plot) 417 428 418 429 def plotAdd(self, new_plot): … … 436 447 """ 437 448 Add data set(s) to the existing matplotlib chart 438 439 TODO: Add 2D-functionality440 449 """ 441 450 # new plot data … … 443 452 444 453 # old plot data 445 plot_id = self.cbgraph.currentText() 446 plot_id = int(plot_id[5:]) 454 plot_id = self.cbgraph.currentIndex() + 1 447 455 448 456 assert plot_id in PlotHelper.currentPlots(), "No such plot: Graph%s"%str(plot_id)
Note: See TracChangeset
for help on using the changeset viewer.