mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
show recent paths even when no file, remove deleted decks from list
This commit is contained in:
parent
cf6b48593f
commit
d594cf61e2
1 changed files with 4 additions and 0 deletions
|
@ -146,6 +146,7 @@ class AnkiQt(QMainWindow):
|
|||
self.currentCard = None
|
||||
self.lastCard = None
|
||||
self.disableDeckMenuItems()
|
||||
self.updateRecentFilesMenu()
|
||||
self.resetButtons()
|
||||
# hide all deck-associated dialogs
|
||||
ui.dialogs.closeAll()
|
||||
|
@ -538,6 +539,9 @@ class AnkiQt(QMainWindow):
|
|||
self.updateRecentFilesMenu()
|
||||
|
||||
def updateRecentFilesMenu(self):
|
||||
self.config['recentDeckPaths'] = [
|
||||
p for p in self.config['recentDeckPaths']
|
||||
if os.path.exists(p)]
|
||||
if not self.config['recentDeckPaths']:
|
||||
self.mainWin.menuOpenRecent.setEnabled(False)
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue