Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Avoid parenting mess by calling the widget directly #2559

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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