eric6/IconEditor/IconEditorGrid.py

changeset 7254
f00d825fbdb3
parent 7229
53054eb5b15a
child 7360
9190402e4505
--- a/eric6/IconEditor/IconEditorGrid.py	Sat Sep 21 16:04:17 2019 +0200
+++ b/eric6/IconEditor/IconEditorGrid.py	Sat Sep 21 17:41:22 2019 +0200
@@ -9,10 +9,12 @@
 
 
 from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QPoint, QRect, QSize
-from PyQt5.QtGui import QImage, QColor, QPixmap, qRgba, QPainter, QCursor, \
-    QBrush, qGray, qAlpha
-from PyQt5.QtWidgets import QUndoCommand, QWidget, QSizePolicy, QUndoStack, \
-    QApplication, QDialog
+from PyQt5.QtGui import (
+    QImage, QColor, QPixmap, qRgba, QPainter, QCursor, QBrush, qGray, qAlpha
+)
+from PyQt5.QtWidgets import (
+    QUndoCommand, QWidget, QSizePolicy, QUndoStack, QApplication, QDialog
+)
 
 from E5Gui import E5MessageBox
 
@@ -711,9 +713,11 @@
         @param doUpdate flag indicating an update is requested (boolean)
             (used for speed optimizations)
         """
-        if not self.__image.rect().contains(i, j) or \
-           self.__image.pixel(i, j) != oldColor.rgba() or \
-           self.__image.pixel(i, j) == self.penColor().rgba():
+        if (
+            not self.__image.rect().contains(i, j) or
+            self.__image.pixel(i, j) != oldColor.rgba() or
+            self.__image.pixel(i, j) == self.penColor().rgba()
+        ):
             return
         
         self.__image.setPixel(i, j, self.penColor().rgba())
@@ -893,8 +897,10 @@
         """
         img, ok = self.__clipboardImage()
         if ok:
-            if img.width() > self.__image.width() or \
-                    img.height() > self.__image.height():
+            if (
+                img.width() > self.__image.width() or
+                img.height() > self.__image.height()
+            ):
                 res = E5MessageBox.yesNo(
                     self,
                     self.tr("Paste"),
@@ -982,8 +988,10 @@
         res = dlg.exec_()
         if res == QDialog.Accepted:
             newWidth, newHeight = dlg.getData()
-            if newWidth != self.__image.width() or \
-                    newHeight != self.__image.height():
+            if (
+                newWidth != self.__image.width() or
+                newHeight != self.__image.height()
+            ):
                 cmd = IconEditCommand(self, self.tr("Resize Image"),
                                       self.__image)
                 img = self.__image.scaled(

eric ide

mercurial