mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04: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"
|
||||
|
||||
class GroupManager(QDialog):
|
||||
def __init__(self, mw):
|
||||
QDialog.__init__(self, mw)
|
||||
def __init__(self, mw, parent=None):
|
||||
QDialog.__init__(self, parent or mw)
|
||||
self.mw = mw
|
||||
self.form = aqt.forms.groupman.Ui_Dialog()
|
||||
self.form.setupUi(self)
|
||||
|
|
|
@ -644,9 +644,9 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
|
|||
def onOverview(self):
|
||||
self.moveToState("overview")
|
||||
|
||||
def onGroups(self):
|
||||
def onGroups(self, parent=None):
|
||||
from aqt.groupman import GroupManager
|
||||
g = GroupManager(self)
|
||||
g = GroupManager(self, parent)
|
||||
|
||||
def onCardStats(self):
|
||||
self.cardStats.show()
|
||||
|
|
|
@ -82,6 +82,7 @@ class DeckStats(QDialog):
|
|||
c = self.connect
|
||||
s = SIGNAL("clicked()")
|
||||
c(f.groups, s, lambda: self.changeSel(True))
|
||||
f.groups.setShortcut("g")
|
||||
c(f.all, s, lambda: self.changeSel(False))
|
||||
c(f.month, s, lambda: self.changePeriod(0))
|
||||
c(f.year, s, lambda: self.changePeriod(1))
|
||||
|
@ -115,6 +116,8 @@ class DeckStats(QDialog):
|
|||
|
||||
def changeSel(self, sel):
|
||||
self.sel = sel
|
||||
if sel:
|
||||
self.mw.onGroups(self)
|
||||
self.refresh()
|
||||
|
||||
def loadFin(self, b):
|
||||
|
|
Loading…
Reference in a new issue