mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
Merge pull request #687 from ankitects/revert-686-master
Revert "Added parameter/return types, fixed possible logic error and typo"
This commit is contained in:
commit
6f830a994d
1 changed files with 5 additions and 5 deletions
|
@ -22,7 +22,7 @@ TYPE_ALL = 3
|
||||||
|
|
||||||
|
|
||||||
class CustomStudy(QDialog):
|
class CustomStudy(QDialog):
|
||||||
def __init__(self, mw: aqt.AnkiQt) -> None:
|
def __init__(self, mw) -> None:
|
||||||
QDialog.__init__(self, mw)
|
QDialog.__init__(self, mw)
|
||||||
self.mw = mw
|
self.mw = mw
|
||||||
self.deck = self.mw.col.decks.current()
|
self.deck = self.mw.col.decks.current()
|
||||||
|
@ -35,7 +35,7 @@ class CustomStudy(QDialog):
|
||||||
f.radioNew.click()
|
f.radioNew.click()
|
||||||
self.exec_()
|
self.exec_()
|
||||||
|
|
||||||
def setupSignals(self) -> None:
|
def setupSignals(self):
|
||||||
f = self.form
|
f = self.form
|
||||||
qconnect(f.radioNew.clicked, lambda: self.onRadioChange(RADIO_NEW))
|
qconnect(f.radioNew.clicked, lambda: self.onRadioChange(RADIO_NEW))
|
||||||
qconnect(f.radioRev.clicked, lambda: self.onRadioChange(RADIO_REV))
|
qconnect(f.radioRev.clicked, lambda: self.onRadioChange(RADIO_REV))
|
||||||
|
@ -44,7 +44,7 @@ class CustomStudy(QDialog):
|
||||||
qconnect(f.radioPreview.clicked, lambda: self.onRadioChange(RADIO_PREVIEW))
|
qconnect(f.radioPreview.clicked, lambda: self.onRadioChange(RADIO_PREVIEW))
|
||||||
qconnect(f.radioCram.clicked, lambda: self.onRadioChange(RADIO_CRAM))
|
qconnect(f.radioCram.clicked, lambda: self.onRadioChange(RADIO_CRAM))
|
||||||
|
|
||||||
def onRadioChange(self, idx: int) -> None:
|
def onRadioChange(self, idx):
|
||||||
f = self.form
|
f = self.form
|
||||||
sp = f.spin
|
sp = f.spin
|
||||||
smin = 1
|
smin = 1
|
||||||
|
@ -56,8 +56,8 @@ class CustomStudy(QDialog):
|
||||||
typeShow = False
|
typeShow = False
|
||||||
ok = _("OK")
|
ok = _("OK")
|
||||||
|
|
||||||
def plus(num: int) -> str:
|
def plus(num):
|
||||||
if num > 1000:
|
if num == 1000:
|
||||||
num = "1000+"
|
num = "1000+"
|
||||||
return "<b>" + str(num) + "</b>"
|
return "<b>" + str(num) + "</b>"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue