Skip to content

Commit 7dd4496

Browse files
committed
append main data Data1D object and add Q range sliders, however, the plot and Q range sliders are now duplicated
1 parent e21de2f commit 7dd4496

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/sas/qtgui/Perspectives/SizeDistribution/SizeDistributionPerspective.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,16 @@ def plotData(self):
494494
GuiUtils.updateModelItemWithPlot(self._model_item, self.fit_plot, title)
495495
plots.append(self.fit_plot)
496496

497+
if len(plots) == 1:
498+
# only the data itself to plot, but need to append the Data1D object
499+
main_data = GuiUtils.dataFromItem(plots[0])
500+
main_data.show_q_range_sliders = True
501+
main_data.slider_update_on_move = False
502+
main_data.slider_perspective_name = "SizeDistribution"
503+
main_data.slider_low_q_input = ["txtMinRange"]
504+
main_data.slider_high_q_input = ["txtMaxRange"]
505+
plots.append(main_data)
506+
497507
self.communicate.plotRequestedSignal.emit(plots, None)
498508

499509
def getState(self):

0 commit comments

Comments
 (0)