diff options
| author | Brianna | 2017-07-27 22:47:40 -0400 |
|---|---|---|
| committer | GitHub | 2017-07-27 22:47:40 -0400 |
| commit | ae2af28808816d67e964b63bee1b5dbc18073672 (patch) | |
| tree | 93818b30c43761288e0414e620e27871ac32cc8d /src/command.py | |
| parent | c799305eff66432d1d42ff3a8d1b7fd24448e1b6 (diff) | |
| parent | 6ecb6df23628de65c9efd8cac4810fdf74238c3d (diff) | |
Merge pull request #49 from djfun/toolkit
Code reorganization, more readable component code, better error messages
Diffstat (limited to 'src/command.py')
| -rw-r--r-- | src/command.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/command.py b/src/command.py index 84d798d..18f7408 100644 --- a/src/command.py +++ b/src/command.py @@ -9,8 +9,7 @@ import os import sys import time -import core -from toolkit import LoadDefaultSettings +from core import Core class Command(QtCore.QObject): @@ -19,7 +18,7 @@ class Command(QtCore.QObject): def __init__(self): QtCore.QObject.__init__(self) - self.core = core.Core() + self.core = Core() self.dataDir = self.core.dataDir self.canceled = False @@ -54,8 +53,7 @@ class Command(QtCore.QObject): nargs='*', action='append') self.args = self.parser.parse_args() - self.settings = self.core.settings - LoadDefaultSettings(self) + self.settings = Core.settings if self.args.projpath: projPath = self.args.projpath @@ -66,7 +64,9 @@ class Command(QtCore.QObject): ) if not projPath.endswith('.avp'): projPath += '.avp' - self.core.openProject(self, projPath) + success = self.core.openProject(self, projPath) + if not success: + quit(1) self.core.selectedComponents = list( reversed(self.core.selectedComponents)) self.core.componentListChanged() @@ -148,6 +148,12 @@ class Command(QtCore.QObject): if 'detail' in kwargs: print(kwargs['detail']) + @QtCore.pyqtSlot(str, str) + def videoThreadError(self, msg, detail): + print(msg) + print(detail) + quit(1) + def drawPreview(self, *args): pass |
