mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 15:17:12 -05:00
allow group selection from graphs window
This commit is contained in:
parent
78808b4541
commit
3155384a9a
3 changed files with 7 additions and 4 deletions
|
|
@ -16,8 +16,8 @@ COLNEW = 5
|
||||||
GREY = "#777"
|
GREY = "#777"
|
||||||
|
|
||||||
class GroupManager(QDialog):
|
class GroupManager(QDialog):
|
||||||
def __init__(self, mw):
|
def __init__(self, mw, parent=None):
|
||||||
QDialog.__init__(self, mw)
|
QDialog.__init__(self, parent or mw)
|
||||||
self.mw = mw
|
self.mw = mw
|
||||||
self.form = aqt.forms.groupman.Ui_Dialog()
|
self.form = aqt.forms.groupman.Ui_Dialog()
|
||||||
self.form.setupUi(self)
|
self.form.setupUi(self)
|
||||||
|
|
|
||||||
|
|
@ -644,9 +644,9 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
|
||||||
def onOverview(self):
|
def onOverview(self):
|
||||||
self.moveToState("overview")
|
self.moveToState("overview")
|
||||||
|
|
||||||
def onGroups(self):
|
def onGroups(self, parent=None):
|
||||||
from aqt.groupman import GroupManager
|
from aqt.groupman import GroupManager
|
||||||
g = GroupManager(self)
|
g = GroupManager(self, parent)
|
||||||
|
|
||||||
def onCardStats(self):
|
def onCardStats(self):
|
||||||
self.cardStats.show()
|
self.cardStats.show()
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,7 @@ class DeckStats(QDialog):
|
||||||
c = self.connect
|
c = self.connect
|
||||||
s = SIGNAL("clicked()")
|
s = SIGNAL("clicked()")
|
||||||
c(f.groups, s, lambda: self.changeSel(True))
|
c(f.groups, s, lambda: self.changeSel(True))
|
||||||
|
f.groups.setShortcut("g")
|
||||||
c(f.all, s, lambda: self.changeSel(False))
|
c(f.all, s, lambda: self.changeSel(False))
|
||||||
c(f.month, s, lambda: self.changePeriod(0))
|
c(f.month, s, lambda: self.changePeriod(0))
|
||||||
c(f.year, s, lambda: self.changePeriod(1))
|
c(f.year, s, lambda: self.changePeriod(1))
|
||||||
|
|
@ -115,6 +116,8 @@ class DeckStats(QDialog):
|
||||||
|
|
||||||
def changeSel(self, sel):
|
def changeSel(self, sel):
|
||||||
self.sel = sel
|
self.sel = sel
|
||||||
|
if sel:
|
||||||
|
self.mw.onGroups(self)
|
||||||
self.refresh()
|
self.refresh()
|
||||||
|
|
||||||
def loadFin(self, b):
|
def loadFin(self, b):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue