mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
make card info checkable and toggle with menu item / keyboard shortcut
This commit is contained in:
parent
1eff071dfd
commit
a5ca6a90b0
3 changed files with 11 additions and 1 deletions
|
@ -677,7 +677,7 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
|
|||
self.moveToState("overview")
|
||||
|
||||
def onCardStats(self):
|
||||
self.cardStats.show()
|
||||
self.cardStats.toggle()
|
||||
|
||||
def onStats(self):
|
||||
aqt.stats.DeckStats(self)
|
||||
|
|
|
@ -37,6 +37,13 @@ class CardStats(object):
|
|||
if self.shown:
|
||||
self.mw.remDockable(self.shown)
|
||||
self.shown = None
|
||||
self.mw.form.actionCstats.setChecked(False)
|
||||
|
||||
def toggle(self):
|
||||
if self.shown:
|
||||
self.hide()
|
||||
else:
|
||||
self.show()
|
||||
|
||||
def _visChange(self, vis):
|
||||
if not vis:
|
||||
|
|
|
@ -143,6 +143,9 @@
|
|||
</property>
|
||||
</action>
|
||||
<action name="actionCstats">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Card Info</string>
|
||||
</property>
|
||||
|
|
Loading…
Reference in a new issue