Skip to content

Commit

Permalink
Support "pure" DockWidget in PanelDescription.fromPanel
Browse files Browse the repository at this point in the history
Fixes taurus-org#1129

MR !940 broke the PanelDescription.fromPanel() when using panels
for which the new attributes were not described.

Make the "fromPanel" robust against this situation.
  • Loading branch information
Carlos Pascual committed May 17, 2021
1 parent 916e8d2 commit 6186504
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/taurus/qt/qtgui/taurusgui/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,11 @@ def fromPanel(panel):
sharedDataWrite=sharedDataWrite,
sharedDataRead=sharedDataRead,
model=model,
icon=panel.icon,
model_in_config=panel.model_in_config,
modifiable_by_user=panel.modifiable_by_user,
widget_formatter=panel.widget_formatter,
widget_properties=panel.widget_properties
icon=getattr(panel, "icon", None),
model_in_config=getattr(panel, "model_in_config", None),
modifiable_by_user=getattr(panel, "modifiable_by_user", None),
widget_formatter=getattr(panel, "widget_formatter", None),
widget_properties=getattr(panel, "widget_properties", {})
)


Expand Down

0 comments on commit 6186504

Please sign in to comment.