Add history-check hack
This commit is contained in:
parent
0a2069742c
commit
fa98e0c324
@ -1070,7 +1070,10 @@ class AnkiConnect:
|
|||||||
|
|
||||||
def _addCards(self):
|
def _addCards(self):
|
||||||
super()._addCards()
|
super()._addCards()
|
||||||
self.reject()
|
|
||||||
|
# if adding was successful it must mean it was added to the history of the window
|
||||||
|
if len(self.history):
|
||||||
|
self.reject()
|
||||||
|
|
||||||
def _reject(self):
|
def _reject(self):
|
||||||
savedMarkClosed = aqt.dialogs.markClosed
|
savedMarkClosed = aqt.dialogs.markClosed
|
||||||
@ -1088,7 +1091,10 @@ class AnkiConnect:
|
|||||||
|
|
||||||
def addCards(self):
|
def addCards(self):
|
||||||
super(AddCardsAndClose, self).addCards()
|
super(AddCardsAndClose, self).addCards()
|
||||||
self.reject()
|
|
||||||
|
# if adding was successful it must mean it was added to the history of the window
|
||||||
|
if len(self.history):
|
||||||
|
self.reject()
|
||||||
|
|
||||||
def reject(self):
|
def reject(self):
|
||||||
savedClose = aqt.dialogs.close
|
savedClose = aqt.dialogs.close
|
||||||
|
Loading…
Reference in New Issue
Block a user