Fix info messages not displayed

parent 9900c13b
......@@ -29,3 +29,8 @@ qint64 QTimerWithTime::elapsed() const
{
return m_time.elapsed();
}
bool QTimerWithTime::isValid() const
{
return m_time.isValid();
}
......@@ -29,6 +29,7 @@ class QTimerWithTime : public QTimer
public:
virtual void start(int msec);
qint64 elapsed() const;
bool isValid() const;
private:
QElapsedTimer m_time;
......
......@@ -149,10 +149,9 @@ void StatusBarMessageLabel::setMessage(const QString &text, MessageType type, in
int delay = 800 * static_cast<int>(m_currentMessage.type == ErrorMessage || m_currentMessage.type == MltError);
m_queueTimer.start(delay);
} else {
// Message with normal priority
m_messageQueue.push_back(item);
if (m_queueTimer.elapsed() >= m_currentMessage.timeoutMillis) {
if (!m_queueTimer.isValid() || m_queueTimer.elapsed() >= m_currentMessage.timeoutMillis) {
m_queueTimer.start(0);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment