diff --git a/aqt/browser.py b/aqt/browser.py index 5163fc426..b548aaac4 100644 --- a/aqt/browser.py +++ b/aqt/browser.py @@ -271,7 +271,12 @@ class StatusDelegate(QItemDelegate): self.model = model def paint(self, painter, option, index): - c = self.model.getCard(index) + try: + c = self.model.getCard(index) + except: + # in the the middle of a reset; return nothing so this row is not + # rendered until we have a chance to reset the model + return if c.queue < 0: # custom render if index.row() % 2 == 0: @@ -342,16 +347,10 @@ class Browser(QMainWindow): def setupMenus(self): # actions c = self.connect; f = self.form; s = SIGNAL("triggered()") - c(f.actionAddItems, s, self.mw.onAddCard) - c(f.actionDeleteNotes, s, self.deleteNotes) - c(f.actionAddTag, s, self.addTags) - c(f.actionDeleteTag, s, self.deleteTags) c(f.actionReposition, s, self.reposition) c(f.actionReschedule, s, self.reschedule) c(f.actionCram, s, self.cram) c(f.actionChangeModel, s, self.onChangeModel) - c(f.actionToggleSuspend, SIGNAL("triggered(bool)"), self.onSuspend) - c(f.actionToggleMark, SIGNAL("triggered(bool)"), self.onMark) # edit c(f.actionOptions, s, self.onOptions) c(f.actionUndo, s, self.mw.onUndo) @@ -365,7 +364,6 @@ class Browser(QMainWindow): c(f.actionFind, s, self.onFind) c(f.actionNote, s, self.onNote) c(f.actionTags, s, self.onTags) - c(f.actionSort, s, self.onSort) c(f.actionCardList, s, self.onCardList) # help c(f.actionGuide, s, self.onHelp) @@ -1231,9 +1229,6 @@ select fm.id, fm.name from fieldmodels fm""") def onTags(self): self.form.tree.setFocus() - def onSort(self): - self.form.sortBox.setFocus() - def onCardList(self): self.form.tableView.setFocus() diff --git a/designer/browser.ui b/designer/browser.ui index a608295cf..946fed790 100644 --- a/designer/browser.ui +++ b/designer/browser.ui @@ -216,19 +216,19 @@ + + + + + - - - - - Cards - - - + + + @@ -248,47 +248,14 @@ - - - Notes - - - - - - - - - - - - - - - - :/icons/Anki_Add_Tag.png:/icons/Anki_Add_Tag.png - - - &Add Tags... - - - - - - :/icons/Anki_Del_Tag.png:/icons/Anki_Del_Tag.png - - - &Delete Tags... - - - :/icons/edit-undo.png:/icons/edit-undo.png + :/icons/view-pim-calendar.png:/icons/view-pim-calendar.png &Reschedule... @@ -308,15 +275,6 @@ &Undo - - - - :/icons/edit-redo.png:/icons/edit-redo.png - - - &Redo - - &Invert Selection @@ -388,7 +346,7 @@ :/icons/system-software-update.png:/icons/system-software-update.png - Change &Model... + Change Fact Type... Ctrl+Shift+M @@ -428,24 +386,6 @@ Browser Options... - - - - :/icons/media-playback-pause.png:/icons/media-playback-pause.png - - - &Suspend Cards - - - - - - :/icons/media-playback-start2.png:/icons/media-playback-start2.png - - - &Unsuspend Cards - - @@ -458,54 +398,6 @@ Ctrl+T - - - - :/icons/view-sort-ascending.png:/icons/view-sort-ascending.png - - - &Sort - - - Ctrl+Shift+S - - - - - - :/icons/list-add.png:/icons/list-add.png - - - Add... - - - Ctrl+D - - - - - true - - - - :/icons/media-playback-pause.png:/icons/media-playback-pause.png - - - Toggle Suspend - - - - - true - - - - :/icons/rating.png:/icons/rating.png - - - Toggle Mark - - @@ -527,18 +419,6 @@ Find &Duplicates... - - - - :/icons/stock_group.png:/icons/stock_group.png - - - Move to Deck... - - - Ctrl+G - - @@ -548,15 +428,6 @@ Reposition... - - - - :/icons/editdelete.png:/icons/editdelete.png - - - Delete - -