Skip to content

Commit

Permalink
Merge pull request #2559 from SasView/2527-deletting-a-dataset-is-not…
Browse files Browse the repository at this point in the history
…-possible-after-closing-a-plot

Avoid parenting mess by calling the widget directly
  • Loading branch information
tsole0 authored Jul 26, 2023
2 parents c92714b + 286d44e commit 46e9481
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sas/qtgui/MainWindow/DataExplorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
from sas.qtgui.Plotting.PlotterData import Data1D
from sas.qtgui.Plotting.PlotterData import Data2D
from sas.qtgui.Plotting.PlotterData import DataRole
from sas.qtgui.Plotting.Plotter import Plotter
from sas.qtgui.Plotting.Plotter2D import Plotter2D
from sas.qtgui.Plotting.Plotter import Plotter, PlotterWidget
from sas.qtgui.Plotting.Plotter2D import Plotter2D, Plotter2DWidget
from sas.qtgui.Plotting.MaskEditor import MaskEditor

from sas.qtgui.MainWindow.DataManager import DataManager
Expand Down Expand Up @@ -1132,7 +1132,7 @@ def addDataPlot2D(self, plot_set, item):
"""
Create a new 2D plot and add it to the workspace
"""
plot2D = Plotter2D(self)
plot2D = Plotter2DWidget(parent=self, manager=self)
plot2D.item = item
plot2D.plot(plot_set)
self.addPlot(plot2D)
Expand Down Expand Up @@ -1160,7 +1160,7 @@ def plotData(self, plots, transform=True):
for item, plot_set in plots:
if isinstance(plot_set, Data1D):
if 'new_plot' not in locals():
new_plot = Plotter(self)
new_plot = PlotterWidget(manager=self, parent=self)
new_plot.item = item
new_plot.plot(plot_set, transform=transform)
# active_plots may contain multiple charts
Expand Down

0 comments on commit 46e9481

Please # to comment.