fixed an issue where normal emotes would be redrawn like gif emotes

This commit is contained in:
fourtf
2018-04-06 17:46:12 +02:00
parent ed50f1835f
commit 0322c73eb5
3 changed files with 16 additions and 1 deletions
+6 -1
View File
@@ -147,6 +147,7 @@ void MessageLayout::paint(QPainter &painter, int y, int messageIndex, Selection
this->buffer = std::shared_ptr<QPixmap>(pixmap);
this->bufferValid = false;
util::DebugCount::increase("message drawing buffers");
}
if (!this->bufferValid || !selection.isEmpty()) {
@@ -221,7 +222,11 @@ void MessageLayout::invalidateBuffer()
void MessageLayout::deleteBuffer()
{
this->buffer = nullptr;
if (this->buffer != nullptr) {
util::DebugCount::decrease("message drawing buffers");
this->buffer = nullptr;
}
}
// Elements