830 @param pasting flag indicating part two of the paste operation (boolean) |
830 @param pasting flag indicating part two of the paste operation (boolean) |
831 """ |
831 """ |
832 img, ok = self.__clipboardImage() |
832 img, ok = self.__clipboardImage() |
833 if ok: |
833 if ok: |
834 if img.width() > self.__image.width() or img.height() > self.__image.height(): |
834 if img.width() > self.__image.width() or img.height() > self.__image.height(): |
835 res = E5MessageBox.question(self, |
835 res = E5MessageBox.yesNo(self, |
836 self.trUtf8("Paste"), |
836 self.trUtf8("Paste"), |
837 self.trUtf8("""<p>The clipboard image is larger than the current """ |
837 self.trUtf8("""<p>The clipboard image is larger than the current """ |
838 """image.<br/>Paste as new image?</p>"""), |
838 """image.<br/>Paste as new image?</p>""")) |
839 QMessageBox.StandardButtons(\ |
839 if res: |
840 QMessageBox.No | \ |
|
841 QMessageBox.Yes), |
|
842 QMessageBox.No) |
|
843 if res == QMessageBox.Yes: |
|
844 self.editPasteAsNew() |
840 self.editPasteAsNew() |
845 return |
841 return |
846 elif not pasting: |
842 elif not pasting: |
847 self.__isPasting = True |
843 self.__isPasting = True |
848 self.__clipboardSize = img.size() |
844 self.__clipboardSize = img.size() |