Changes in src/sas/qtgui/DataExplorer.py [253e7170:edbd4b6] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/DataExplorer.py
r253e7170 redbd4b6 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 """ … … 374 384 orig_text = self.cbgraph.currentText() 375 385 self.cbgraph.clear() 376 graph_titles = []377 386 graph_titles= ["Graph"+str(graph) for graph in graph_list] 378 387 … … 381 390 if ind > 0: 382 391 self.cbgraph.setCurrentIndex(ind) 383 pass384 392 385 393 def newPlot(self): … … 411 419 raise AttributeError, msg 412 420 421 413 422 if plots and \ 414 hasattr(new_plot, 'data') and \415 len(new_plot.data.x) > 0:416 self.plotAdd(new_plot)423 hasattr(new_plot, 'data') and \ 424 isinstance(new_plot.data, Data1D): 425 self.plotAdd(new_plot) 417 426 418 427 def plotAdd(self, new_plot): … … 436 445 """ 437 446 Add data set(s) to the existing matplotlib chart 438 439 TODO: Add 2D-functionality440 447 """ 441 448 # new plot data … … 443 450 444 451 # old plot data 445 plot_id = self.cbgraph.currentText() 446 plot_id = int(plot_id[5:]) 452 plot_id = self.cbgraph.currentIndex() + 1 447 453 448 454 assert plot_id in PlotHelper.currentPlots(), "No such plot: Graph%s"%str(plot_id) … … 490 496 data_error = False 491 497 error_message = "" 498 492 499 number_of_files = len(path) 493 500 self.communicator.progressBarUpdateSignal.emit(0.0)
Note: See TracChangeset
for help on using the changeset viewer.