mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
fix(launch_window): return None when cancelling the ui file launcher
This commit is contained in:
@ -210,7 +210,7 @@ class LaunchWindow(BECMainWindow):
|
|||||||
name: str | None = None,
|
name: str | None = None,
|
||||||
geometry: tuple[int, int, int, int] | None = None,
|
geometry: tuple[int, int, int, int] | None = None,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
) -> QWidget:
|
) -> QWidget | None:
|
||||||
"""Launch the specified script. If the launch script creates a QWidget, it will be
|
"""Launch the specified script. If the launch script creates a QWidget, it will be
|
||||||
embedded in a BECMainWindow. If the launch script creates a BECMainWindow, it will be shown
|
embedded in a BECMainWindow. If the launch script creates a BECMainWindow, it will be shown
|
||||||
as a separate window.
|
as a separate window.
|
||||||
@ -246,6 +246,8 @@ class LaunchWindow(BECMainWindow):
|
|||||||
|
|
||||||
if launch_script == "custom_ui_file":
|
if launch_script == "custom_ui_file":
|
||||||
ui_file = kwargs.pop("ui_file", None)
|
ui_file = kwargs.pop("ui_file", None)
|
||||||
|
if not ui_file:
|
||||||
|
return None
|
||||||
return self._launch_custom_ui_file(ui_file)
|
return self._launch_custom_ui_file(ui_file)
|
||||||
|
|
||||||
if launch_script == "auto_update":
|
if launch_script == "auto_update":
|
||||||
|
Reference in New Issue
Block a user