3058 fromLine, fromIndex, toLine, toIndex = ( |
3058 fromLine, fromIndex, toLine, toIndex = ( |
3059 self.__textEdit.getSelection() |
3059 self.__textEdit.getSelection() |
3060 ) |
3060 ) |
3061 if toIndex == 0: |
3061 if toIndex == 0: |
3062 toLine -= 1 |
3062 toLine -= 1 |
3063 # Qscintilla seems to print one line more than told |
3063 # QScintilla seems to print one line more than told |
3064 res = printer.printRange(self.__textEdit, fromLine, toLine - 1) |
3064 res = printer.printRange(self.__textEdit, fromLine, toLine - 1) |
3065 else: |
3065 else: |
3066 res = printer.printRange(self.__textEdit) |
3066 res = printer.printRange(self.__textEdit) |
3067 if res: |
3067 if res: |
3068 sb.showMessage(self.tr('Printing completed'), 2000) |
3068 sb.showMessage(self.tr('Printing completed'), 2000) |