mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
do not render the graphs twice when showing the graphs window for the first time!
This commit is contained in:
parent
cf31a22e91
commit
dd0f452df8
1 changed files with 5 additions and 3 deletions
|
@ -89,11 +89,13 @@ class AdjustableFigure(QWidget):
|
||||||
self.periodCombo.setCurrentIndex(idx)
|
self.periodCombo.setCurrentIndex(idx)
|
||||||
self.connect(self.periodCombo, SIGNAL("currentIndexChanged(int)"),
|
self.connect(self.periodCombo, SIGNAL("currentIndexChanged(int)"),
|
||||||
self.onPeriodChange)
|
self.onPeriodChange)
|
||||||
self.onPeriodChange(idx)
|
self.onPeriodChange(idx, initialSkip=True)
|
||||||
|
|
||||||
def onPeriodChange(self, index):
|
def onPeriodChange(self, index, initialSkip=False):
|
||||||
|
print "period changed!"
|
||||||
self.config['graphs.period.' + self.name] = index
|
self.config['graphs.period.' + self.name] = index
|
||||||
self.range = self.choices[index]
|
self.range = self.choices[index]
|
||||||
|
if not initialSkip:
|
||||||
self.scheduleUpdate()
|
self.scheduleUpdate()
|
||||||
|
|
||||||
def scheduleUpdate(self):
|
def scheduleUpdate(self):
|
||||||
|
|
Loading…
Reference in a new issue