projects
/
evehomescreen
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d177488
)
check that last update is later than now
author
jasu
<jasu@skeletor.(none)>
Sun, 23 May 2010 10:16:25 +0000
(13:16 +0300)
committer
jasu
<jasu@skeletor.(none)>
Sun, 23 May 2010 10:16:25 +0000
(13:16 +0300)
src/widget.cpp
patch
|
blob
|
history
diff --git
a/src/widget.cpp
b/src/widget.cpp
index
a6694fd
..
0f41be0
100644
(file)
--- a/
src/widget.cpp
+++ b/
src/widget.cpp
@@
-174,10
+174,12
@@
void Widget::trainingLoaded()
m_updateTimer->stop();
QDateTime nextUpdate = m_training->lastTraining().endTime;
m_updateTimer->stop();
QDateTime nextUpdate = m_training->lastTraining().endTime;
- nextUpdate.addSecs(-1*60*60*24);
- m_updateTimer->setInterval(1000 * (m_training->currentTime.secsTo(nextUpdate) + 15));
- m_updateTimer->start();
+ nextUpdate.addSecs(-1*60*60*24);
+ if (nextUpdate > m_training->currentTime) {
+ m_updateTimer->setInterval(1000 * (m_training->currentTime.secsTo(nextUpdate) + 15));
+ m_updateTimer->start();
+ }
}
update();
}
}
update();
}