2721 ): |
2721 ): |
2722 # get the selection |
2722 # get the selection |
2723 fromLine, fromIndex, toLine, toIndex = self.getSelection() |
2723 fromLine, fromIndex, toLine, toIndex = self.getSelection() |
2724 if toIndex == 0: |
2724 if toIndex == 0: |
2725 toLine -= 1 |
2725 toLine -= 1 |
2726 # Qscintilla seems to print one line more than told |
2726 # QScintilla seems to print one line more than told |
2727 res = printer.printRange(self, fromLine, toLine - 1) |
2727 res = printer.printRange(self, fromLine, toLine - 1) |
2728 else: |
2728 else: |
2729 res = printer.printRange(self) |
2729 res = printer.printRange(self) |
2730 if res: |
2730 if res: |
2731 sb.showMessage(self.tr('Printing completed'), 2000) |
2731 sb.showMessage(self.tr('Printing completed'), 2000) |