From: Kern Sibbald Date: Sat, 27 Nov 2010 20:21:54 +0000 (+0100) Subject: Update bat console display only if new text comes in X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4d4374d78335f73011a98eadf228bf8fbb864482;p=bacula%2Fbacula Update bat console display only if new text comes in --- diff --git a/bacula/src/qt-console/console/console.cpp b/bacula/src/qt-console/console/console.cpp index 7c1d9d5a98..c7e52260cc 100644 --- a/bacula/src/qt-console/console/console.cpp +++ b/bacula/src/qt-console/console/console.cpp @@ -581,21 +581,27 @@ void Console::display_textf(const char *fmt, ...) void Console::display_text(const QString buf) { - m_cursor->insertText(buf); - update_cursor(); + if (buf.size() != 0) { + m_cursor->insertText(buf); + update_cursor(); + } } void Console::display_text(const char *buf) { - m_cursor->insertText(buf); - update_cursor(); + if (*buf != 0) { + m_cursor->insertText(buf); + update_cursor(); + } } void Console::display_html(const QString buf) { - m_cursor->insertHtml(buf); - update_cursor(); + if (buf.size() != 0) { + m_cursor->insertHtml(buf); + update_cursor(); + } } /* Position cursor to end of screen */