diff --git a/ankiqt/ui/deckproperties.py b/ankiqt/ui/deckproperties.py
index eca9818e0..7464afe2c 100644
--- a/ankiqt/ui/deckproperties.py
+++ b/ankiqt/ui/deckproperties.py
@@ -77,6 +77,9 @@ class DeckProperties(QDialog):
self.drawSourcesTable()
# models
self.updateModelsList()
+ # hour shift
+ self.dialog.timeOffset.setText(str(
+ (self.d.utcOffset - time.timezone) / 60.0 / 60.0))
def drawSourcesTable(self):
self.dialog.sourcesTable.clear()
@@ -227,6 +230,13 @@ class DeckProperties(QDialog):
self.updateField(self.d, 'newCardsPerDay', v)
except ValueError:
pass
+ # hour shift
+ try:
+ self.updateField(self.d, 'utcOffset',
+ float(str(self.dialog.timeOffset.text()))
+ *60*60 + time.timezone)
+ except:
+ pass
self.updateField(self.d, 'collapseTime',
self.dialog.collapse.isChecked() and 1 or 0)
self.updateField(self.d,
diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py
index 24f967410..78185e9bc 100644
--- a/ankiqt/ui/main.py
+++ b/ankiqt/ui/main.py
@@ -251,6 +251,7 @@ class AnkiQt(QMainWindow):
if self.state == "deckFinished":
# don't try refresh if the deck is closed during a sync
if self.deck:
+ self.deck.checkDailyStats()
self.deck.markExpiredCardsDue()
self.moveToState("getQuestion")
if self.state != "deckFinished":
diff --git a/ankiqt/ui/update.py b/ankiqt/ui/update.py
index 06eaf05f0..858d3b6de 100644
--- a/ankiqt/ui/update.py
+++ b/ankiqt/ui/update.py
@@ -24,7 +24,7 @@ class LatestVersionFinder(QThread):
# calculate stats before we start a new thread
if self.main.deck != None:
deckSize = self.main.deck.cardCount()
- stats = anki.stats.globalStats(self.main.deck.s)
+ stats = anki.stats.globalStats(self.main.deck)
deckRecall = "%0.2f" % (
(stats.matureEase3 + stats.matureEase4) /
float(stats.matureEase0 +
diff --git a/designer/deckproperties.ui b/designer/deckproperties.ui
index cffd42727..159662e4a 100644
--- a/designer/deckproperties.ui
+++ b/designer/deckproperties.ui
@@ -8,7 +8,7 @@
0
0
- 388
+ 389
408
@@ -29,7 +29,7 @@
0
0
- 372
+ 373
342
@@ -446,7 +446,7 @@ p, li { white-space: pre-wrap; }
0
0
- 372
+ 373
342
@@ -615,6 +615,40 @@ p, li { white-space: pre-wrap; }
+ -
+
+
+ <h1>Day Rollover</h1>
+
+
+
+ -
+
+
-
+
+
+ Hours to shift midnight
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+
-