diff options
| author | tassaron | 2017-08-20 17:47:00 -0400 |
|---|---|---|
| committer | tassaron | 2017-08-20 17:47:00 -0400 |
| commit | be9eb9077b2234e6d91c78d70bb8e1d8347b03aa (patch) | |
| tree | 12688f1846cfc535408d2a3953d0731eed98fd10 /src/gui | |
| parent | d4b63e4d4612db262424fe10c83f8eaa4f741f24 (diff) | |
relative widgets scale properly when undoing at different resolutions
Diffstat (limited to 'src/gui')
| -rw-r--r-- | src/gui/mainwindow.py | 7 | ||||
| -rw-r--r-- | src/gui/preview_thread.py | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/mainwindow.py b/src/gui/mainwindow.py index 833d2d1..2841896 100644 --- a/src/gui/mainwindow.py +++ b/src/gui/mainwindow.py @@ -88,10 +88,13 @@ class MainWindow(QtWidgets.QMainWindow): self.previewWorker.imageCreated.connect(self.showPreviewImage) self.previewThread.start() - log.debug('Starting preview timer') + timeout = 500 + log.debug( + 'Preview timer set to trigger when idle for %sms' % str(timeout) + ) self.timer = QtCore.QTimer(self) self.timer.timeout.connect(self.processTask.emit) - self.timer.start(500) + self.timer.start(timeout) # Begin decorating the window and connecting events self.window.installEventFilter(self) diff --git a/src/gui/preview_thread.py b/src/gui/preview_thread.py index 33a9e7a..d3e0581 100644 --- a/src/gui/preview_thread.py +++ b/src/gui/preview_thread.py @@ -45,8 +45,6 @@ class Worker(QtCore.QObject): @pyqtSlot() def process(self): - width = int(self.settings.value('outputWidth')) - height = int(self.settings.value('outputHeight')) try: nextPreviewInformation = self.queue.get(block=False) while self.queue.qsize() >= 2: @@ -54,12 +52,14 @@ class Worker(QtCore.QObject): self.queue.get(block=False) except Empty: continue + width = int(self.settings.value('outputWidth')) + height = int(self.settings.value('outputHeight')) if self.background.width != width \ or self.background.height != height: self.background = Checkerboard(width, height) frame = self.background.copy() - log.debug('Creating new preview frame') + log.info('Creating new preview frame') components = nextPreviewInformation["components"] for component in reversed(components): try: |
