diff options
Diffstat (limited to 'src/statusbarmessagelabel.cpp')
| -rw-r--r-- | src/statusbarmessagelabel.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/statusbarmessagelabel.cpp b/src/statusbarmessagelabel.cpp index 6b528d802..c870406d3 100644 --- a/src/statusbarmessagelabel.cpp +++ b/src/statusbarmessagelabel.cpp @@ -61,22 +61,21 @@ StatusBarMessageLabel::~StatusBarMessageLabel() void StatusBarMessageLabel::setMessage(const QString& text, DolphinStatusBar::Type type) { + if ((text == m_text) && (type == m_type)) { + return; + } + if (m_type == DolphinStatusBar::Error) { - // If an error is shown currently, other error messages get queued. - // Non-error messages are ignored if there are pending error messages. if (type == DolphinStatusBar::Error) { - m_pendingMessages.append(text); - return; + m_pendingMessages.insert(0, m_text); } - if ((m_state != Default) || !m_pendingMessages.isEmpty()) { + else if ((m_state != Default) || !m_pendingMessages.isEmpty()) { + // a non-error message should not be shown, as there + // are other pending error messages in the queue return; } } - if ((text == m_text) && (type == m_type)) { - return; - } - m_text = text; m_type = type; |
