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-Tag: Release-7.0.0~1327 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cb38b16e91d51280dd13f4e80a32bbd8dd9284db;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 dad9a32d91..5e9967ebd4 100644 --- a/bacula/src/qt-console/console/console.cpp +++ b/bacula/src/qt-console/console/console.cpp @@ -583,21 +583,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 */