Commit 5c908e5f authored by dmMaze's avatar dmMaze
Browse files

make showed block index start from 1

parent f4b36fed
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -313,7 +313,7 @@ class TransPairWidget(Widget):
        self.e_source = SourceTextEdit(idx, self, fold)
        self.e_trans = TransTextEdit(idx, self, fold)
        self.idx_label = IgnoreMouseLabel(self)
        self.idx_label.setText(str(idx).zfill(2))
        self.idx_label.setText(str(idx + 1).zfill(2))   # showed index start from 1!
        self.textblock = textblock
        self.idx = idx
        self.checked = False
@@ -376,9 +376,10 @@ class TransPairWidget(Widget):
            self.check_state_changed.emit(self, shift_pressed, ctrl_pressed)
        return super().mouseReleaseEvent(e)

    def updateIndex(self, idx):
    def updateIndex(self, idx: int):
        if self.idx != idx:
            self.idx = idx
        self.idx_label.setText(str(idx).zfill(2))
            self.idx_label.setText(str(idx + 1).zfill(2))
            self.e_source.idx = idx
            self.e_trans.idx = idx