mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
use dialog result instead of global RESULT
This commit is contained in:
parent
5cc3977aea
commit
1aa91da358
1 changed files with 2 additions and 13 deletions
|
|
@ -10,15 +10,6 @@ from .bootstrap_repos import BootstrapRepos
|
|||
from .version import __version__ as version
|
||||
|
||||
|
||||
RESULT = 0
|
||||
|
||||
|
||||
def get_result(res: int):
|
||||
"""Sets result returned from dialog."""
|
||||
global RESULT
|
||||
RESULT = res
|
||||
|
||||
|
||||
def open_dialog():
|
||||
"""Show Igniter dialog."""
|
||||
from Qt import QtWidgets, QtCore
|
||||
|
|
@ -31,12 +22,10 @@ def open_dialog():
|
|||
app = QtWidgets.QApplication(sys.argv)
|
||||
|
||||
d = InstallDialog()
|
||||
d.finished.connect(get_result)
|
||||
d.open()
|
||||
|
||||
app.exec()
|
||||
|
||||
return RESULT
|
||||
app.exec_()
|
||||
return d.result()
|
||||
|
||||
|
||||
__all__ = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue