diff options
| author | tassaron | 2017-08-27 19:59:51 -0400 |
|---|---|---|
| committer | tassaron | 2017-08-27 19:59:51 -0400 |
| commit | ad6dd9f5329f3e23e75c181c21ca8701028b538f (patch) | |
| tree | d65ef45ad07685254d0921a15aa0315d1735047f /src/gui | |
| parent | 4a310ffb2870babf6774da843cad271f8a477bcc (diff) | |
undoable Life component grid actions
Diffstat (limited to 'src/gui')
| -rw-r--r-- | src/gui/preview_win.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/preview_win.py b/src/gui/preview_win.py index 49a22eb..3db420c 100644 --- a/src/gui/preview_win.py +++ b/src/gui/preview_win.py @@ -1,14 +1,14 @@ from PyQt5 import QtCore, QtGui, QtWidgets import logging +log = logging.getLogger('AVP.Gui.PreviewWindow') + class PreviewWindow(QtWidgets.QLabel): ''' Paints the preview QLabel in MainWindow and maintains the aspect ratio when the window is resized. ''' - log = logging.getLogger('AVP.Gui.PreviewWindow') - def __init__(self, parent, img): super(PreviewWindow, self).__init__() self.parent = parent @@ -41,17 +41,15 @@ class PreviewWindow(QtWidgets.QLabel): if i >= 0: component = self.parent.core.selectedComponents[i] if not hasattr(component, 'previewClickEvent'): - self.log.info('Ignored click event') return pos = (event.x(), event.y()) size = (self.width(), self.height()) butt = event.button() - self.log.info('Click event for #%s: %s button %s' % ( + log.info('Click event for #%s: %s button %s' % ( i, pos, butt)) component.previewClickEvent( pos, size, butt ) - self.parent.core.updateComponent(i) @QtCore.pyqtSlot(str) def threadError(self, msg): |
