ui: Fixed history dropdown click opened again when clicking on history button on Windows
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user