ui: Fixed history dropdown click opened again when clicking on history button on Windows

This commit is contained in:
Eberhard Graether
2017-12-15 15:38:43 +01:00
parent 76f5ee1dc0
commit 618ed72241
7 changed files with 52 additions and 10 deletions
+5 -5
View File
@@ -51,12 +51,12 @@ std::string TimeStamp::getDDMMYYYYString() const
size_t TimeStamp::deltaMS(const TimeStamp& other) const
{
return (m_time - other.m_time).total_milliseconds();
return abs((m_time - other.m_time).total_milliseconds());
}
size_t TimeStamp::deltaS(const TimeStamp& other) const
{
return (m_time - other.m_time).total_seconds();
return abs((m_time - other.m_time).total_seconds());
}
bool TimeStamp::isSameDay(const TimeStamp& other) const
@@ -74,11 +74,11 @@ bool TimeStamp::isSameDay(const TimeStamp& other) const
size_t TimeStamp::deltaDays(const TimeStamp& other) const
{
boost::gregorian::date_duration deltaDate = m_time.date() - other.m_time.date();
return size_t(std::abs(deltaDate.days()));
return abs(deltaDate.days());
}
long TimeStamp::deltaHours(const TimeStamp& other) const
size_t TimeStamp::deltaHours(const TimeStamp& other) const
{
boost::posix_time::time_duration delta = m_time - other.m_time;
return delta.total_seconds() / 3600;
return abs(delta.total_seconds() / 3600);
}
+1 -1
View File
@@ -31,7 +31,7 @@ public:
// days are counted beginning at 00:00, so a tp of 1.1.2017 23:59 is 1 day ago if it's the 2.1.2017 00:01
size_t deltaDays(const TimeStamp& other) const;
long deltaHours(const TimeStamp& other) const;
size_t deltaHours(const TimeStamp& other) const;
private:
boost::posix_time::ptime m_time;