From 986f3f4964aaddedffa9a3b1dc54782a9af9bbb5 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 27 Nov 2010 21:21:54 +0100 Subject: [PATCH] Update bat console display only if new text comes in --- bacula/src/qt-console/console/console.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) 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 */ -- 2.39.5