Changes in / [4f790d2:170e95d] in sasview
- Files:
-
- 58 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/DataExplorer.py
r7d8bebf rfef38e8 90 90 self.communicator = self.parent.communicator() 91 91 self.communicator.fileReadSignal.connect(self.loadFromURL) 92 self.communicator.activeGraphsSignal.connect(self.updateGraphCo unt)92 self.communicator.activeGraphsSignal.connect(self.updateGraphCombo) 93 93 self.communicator.activeGraphName.connect(self.updatePlotName) 94 94 self.communicator.plotUpdateSignal.connect(self.updatePlot) … … 417 417 self.cbgraph.setItemText(ind, current_name) 418 418 419 def updateGraphCount(self, graph_list):420 """421 Modify the graph name combo and potentially remove422 deleted graphs423 """424 self.updateGraphCombo(graph_list)425 426 if not self.active_plots:427 return428 new_plots = [PlotHelper.plotById(plot) for plot in graph_list]429 active_plots_copy = self.active_plots.keys()430 for plot in active_plots_copy:431 if self.active_plots[plot] in new_plots:432 continue433 self.active_plots.pop(plot)434 435 419 def updateGraphCombo(self, graph_list): 436 420 """ … … 439 423 orig_text = self.cbgraph.currentText() 440 424 self.cbgraph.clear() 425 #graph_titles= [str(graph) for graph in graph_list] 426 427 #self.cbgraph.insertItems(0, graph_titles) 441 428 self.cbgraph.insertItems(0, graph_list) 442 429 ind = self.cbgraph.findText(orig_text) … … 467 454 plot_id = plot.id 468 455 if plot_id in self.active_plots.keys(): 469 self.active_plots[plot_id].replacePlot(plot_id, plot )456 self.active_plots[plot_id].replacePlot(plot_id, plot_to_show) 470 457 else: 471 458 self.plotData([(None, plot)]) … … 499 486 # Call show on requested plots 500 487 # All same-type charts in one plot 501 #if isinstance(plot_set, Data1D): 502 # new_plot = Plotter(self) 488 new_plot = Plotter(self) 503 489 504 490 for item, plot_set in plots: 505 491 if isinstance(plot_set, Data1D): 506 if not 'new_plot' in locals():507 new_plot = Plotter(self)508 492 new_plot.plot(plot_set) 509 493 elif isinstance(plot_set, Data2D): … … 513 497 raise AttributeError, msg 514 498 515 if 'new_plot' in locals()and \499 if plots and \ 516 500 hasattr(new_plot, 'data') and \ 517 501 isinstance(new_plot.data, Data1D): … … 537 521 title = str(PlotHelper.idOfPlot(new_plot)) 538 522 new_plot.setWindowTitle(title) 539 540 # Set the object name to satisfy the Squish object picker541 new_plot.setObjectName(title)542 523 543 524 # Add the plot to the workspace -
src/sas/qtgui/Plotting/PlotterBase.py
r7d8bebf rdc5ef15 128 128 """ title setter """ 129 129 self._title = title 130 # Set the object name to satisfy the Squish object picker131 self.canvas.setObjectName(title)132 130 133 131 @property … … 273 271 # Please remove me from your database. 274 272 PlotHelper.deletePlot(PlotHelper.idOfPlot(self)) 275 276 273 # Notify the listeners 277 274 self.manager.communicator.activeGraphsSignal.emit(PlotHelper.currentPlots()) 278 279 275 event.accept() 280 276
Note: See TracChangeset
for help on using the changeset viewer.