diff --git a/src/chatlog/chatlog.cpp b/src/chatlog/chatlog.cpp index b2d8239ad..4f07c9ad7 100644 --- a/src/chatlog/chatlog.cpp +++ b/src/chatlog/chatlog.cpp @@ -433,25 +433,7 @@ void ChatLog::insertChatlineOnTop(ChatLine::Ptr l) if(!l.get()) return; - bool stickToBtm = stickToBottom(); - - //move all lines down by 1 - for(ChatLine::Ptr l : lines) - l->setRowIndex(l->getRowIndex() + 1); - - //add the new line - l->addToScene(scene); - l->setRowIndex(0); - lines.prepend(l); - - //full refresh is required - layout(0, lines.size(), useableWidth()); - updateSceneRect(); - - if(stickToBtm) - scrollToBottom(); - - checkVisibility(); + insertChatlineOnTop(QList() << l); } void ChatLog::insertChatlineOnTop(const QList& newLines)