[Fix] close #2055
This commit is contained in:
parent
dc97cbde06
commit
019da35a55
@ -106,6 +106,10 @@ class ChartWidget(pg.PlotWidget):
|
||||
# Store plot object in dict
|
||||
self._plots[plot_name] = plot
|
||||
|
||||
# Add plot onto the layout
|
||||
self._layout.nextRow()
|
||||
self._layout.addItem(plot)
|
||||
|
||||
def add_item(
|
||||
self,
|
||||
item_class: Type[ChartItem],
|
||||
@ -120,10 +124,8 @@ class ChartWidget(pg.PlotWidget):
|
||||
|
||||
plot = self._plots.get(plot_name)
|
||||
plot.addItem(item)
|
||||
self._item_plot_map[item] = plot
|
||||
|
||||
self._layout.nextRow()
|
||||
self._layout.addItem(plot)
|
||||
self._item_plot_map[item] = plot
|
||||
|
||||
def get_plot(self, plot_name: str) -> pg.PlotItem:
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user