From a8acb05c52249ce55e9e8081e2ed3a55e4c34225 Mon Sep 17 00:00:00 2001 From: krepa098 Date: Sat, 7 Feb 2015 14:38:12 +0100 Subject: [PATCH] FTW: Don't fire an animation if start- and endcolor are the same --- src/chatlog/content/filetransferwidget.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/chatlog/content/filetransferwidget.cpp b/src/chatlog/content/filetransferwidget.cpp index 3f8efea59..2cf302a4d 100644 --- a/src/chatlog/content/filetransferwidget.cpp +++ b/src/chatlog/content/filetransferwidget.cpp @@ -121,9 +121,12 @@ void FileTransferWidget::acceptTransfer(const QString &filepath) void FileTransferWidget::setColor(const QColor &c, bool whiteFont) { - colorAnimation->setStartValue(color); - colorAnimation->setEndValue(c); - colorAnimation->start(); + if(c != color) + { + colorAnimation->setStartValue(color); + colorAnimation->setEndValue(c); + colorAnimation->start(); + } setProperty("fontColor", whiteFont ? "white" : "black");