[vlc-commits] Qt: messages: no empty start block

Francois Cartegnie git at videolan.org
Tue Apr 16 15:28:12 CEST 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Apr 16 15:09:35 2019 +0200| [eccb31740cdc8ee5648b044ac522b2f4253073f0] | committer: Francois Cartegnie

Qt: messages: no empty start block

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eccb31740cdc8ee5648b044ac522b2f4253073f0
---

 modules/gui/qt/dialogs/messages.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/dialogs/messages.cpp b/modules/gui/qt/dialogs/messages.cpp
index 5b70faa7ac..013c16f61f 100644
--- a/modules/gui/qt/dialogs/messages.cpp
+++ b/modules/gui/qt/dialogs/messages.cpp
@@ -213,8 +213,9 @@ void MessagesDialog::sinkMessage( const MsgEvent *msg )
          messages->textCursor().anchor() != messages->textCursor().position() )
          messages->moveCursor( QTextCursor::End );
 
-    /* Start a new logic block so we can hide it on-demand */
-    messages->textCursor().insertBlock();
+    /* Start a new logic block */
+    if( !messages->document()->isEmpty() )
+        messages->textCursor().insertBlock();
 
     QString buf = QString( "<i><font color='darkblue'>%1</font>" ).arg( msg->module );
 



More information about the vlc-commits mailing list