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