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,12 +89,14 @@ class AdjustableFigure(QWidget):
|
|||
self.periodCombo.setCurrentIndex(idx)
|
||||
self.connect(self.periodCombo, SIGNAL("currentIndexChanged(int)"),
|
||||
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.range = self.choices[index]
|
||||
self.scheduleUpdate()
|
||||
if not initialSkip:
|
||||
self.scheduleUpdate()
|
||||
|
||||
def scheduleUpdate(self):
|
||||
if not self.updateTimer:
|
||||
|
|
Loading…
Reference in a new issue