Skip to content

Commit 4920bd8

Browse files
author
PyCompiler ARK++
committed
amelioration pour que tout soit gui et interactive sync
1 parent 259e819 commit 4920bd8

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

Plugins_SDK/GeneralContext/Dialog.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,11 @@ def __init__(
182182
self._canceled = False
183183
self._dlg = None
184184
self._last_pct = -1
185-
if _QtW is not None:
185+
if _QtW is not None and not _is_noninteractive():
186186
try:
187+
app = _QtW.QApplication.instance()
188+
if app is None:
189+
raise RuntimeError("No Qt application")
187190
parent = _qt_active_parent()
188191
dlg = _QtW.QProgressDialog(parent)
189192
dlg.setWindowTitle(self._title or "Progression")

bcasl/only_mod/app.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
import sys
66
from pathlib import Path
77

8+
# Force interactive GUI mode for BCASL-only runs
9+
os.environ["PYCOMPILER_NONINTERACTIVE"] = "0"
10+
811
from PySide6.QtWidgets import QApplication
912
from PySide6.QtGui import QIcon
1013
from PySide6.QtCore import QSettings

main.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@
6363
except Exception:
6464
pass
6565

66+
# Force interactive GUI mode for all runs launched via this entry point
67+
os.environ["PYCOMPILER_NONINTERACTIVE"] = "0"
68+
6669
# DPI/scaling hints
6770
os.environ.setdefault("QT_AUTO_SCREEN_SCALE_FACTOR", "1")
6871
os.environ.setdefault("QT_ENABLE_HIGHDPI_SCALING", "1")

0 commit comments

Comments
 (0)