mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
fix(figure): if/else logic corrected in subplot_factory
This commit is contained in:
@ -555,7 +555,7 @@ class BECFigure(BECConnector, pg.GraphicsLayoutWidget):
|
|||||||
return widget
|
return widget
|
||||||
|
|
||||||
# Case 3 - modifying existing plot wit coordinates provided
|
# Case 3 - modifying existing plot wit coordinates provided
|
||||||
elif new is False and (row is not None and col is not None):
|
if new is False and (row is not None and col is not None):
|
||||||
try:
|
try:
|
||||||
widget = self.axes(row, col)
|
widget = self.axes(row, col)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
@ -568,9 +568,8 @@ class BECFigure(BECConnector, pg.GraphicsLayoutWidget):
|
|||||||
return widget
|
return widget
|
||||||
|
|
||||||
# Case 4 - no previous plot or new plot, no config provided, possible to define coordinates
|
# Case 4 - no previous plot or new plot, no config provided, possible to define coordinates
|
||||||
else:
|
widget = self.add_widget(widget_type=widget_type, row=row, col=col, **axis_kwargs)
|
||||||
widget = self.add_widget(widget_type=widget_type, row=row, col=col, **axis_kwargs)
|
return widget
|
||||||
return widget
|
|
||||||
|
|
||||||
def add_widget(
|
def add_widget(
|
||||||
self,
|
self,
|
||||||
|
Reference in New Issue
Block a user