Properly order IPython-related logic.
We try to integrate the notification manager before trying to integrate
with IPython event loop.
Not sure the effects it can have but that seem wrong.
@@ -165,14 +165,6 @@ def get_app(
# to allow for text wrapping of tooltips
app.installEventFilter(QtToolTipEventFilter())
- if not _ipython_has_eventloop():
- notification_manager.notification_ready.connect(
- NapariQtNotification.show_notification
- )
- notification_manager.notification_ready.connect(
- show_console_notification
- )
-
if app.windowIcon().isNull():
app.setWindowIcon(QIcon(kwargs.get('icon')))
@@ -181,6 +173,14 @@ def get_app(
if _IPYTHON_WAS_HERE_FIRST:
_try_enable_ipython_gui('qt' if ipy_interactive else None)
+ if not _ipython_has_eventloop():
+ notification_manager.notification_ready.connect(
+ NapariQtNotification.show_notification
+ )
+ notification_manager.notification_ready.connect(
+ show_console_notification
+ )
+
if perf_config and not perf_config.patched:
# Will patch based on config file.
perf_config.patch_callables()
