diff --git a/src/messages/layouts/messagelayout.cpp b/src/messages/layouts/messagelayout.cpp index d9a0f484a..860fb243f 100644 --- a/src/messages/layouts/messagelayout.cpp +++ b/src/messages/layouts/messagelayout.cpp @@ -76,6 +76,7 @@ bool MessageLayout::layout(int width, float scale, MessageElement::Flags flags) // check if timestamp format changed bool timestampFormatChanged = this->timestampFormat != app->settings->timestampFormat; + this->timestampFormat = app->settings->timestampFormat.getValue(); layoutRequired |= timestampFormatChanged; @@ -86,6 +87,8 @@ bool MessageLayout::layout(int width, float scale, MessageElement::Flags flags) imagesChanged |= scaleChanged; textChanged |= scaleChanged; +// assert(layoutRequired); + // update word sizes if needed if (imagesChanged) { // this->container.updateImages(); @@ -100,6 +103,8 @@ bool MessageLayout::layout(int width, float scale, MessageElement::Flags flags) } // return if no layout is required + qDebug() << layoutRequired; + if (!layoutRequired) { return false; } @@ -123,8 +128,6 @@ void MessageLayout::actuallyLayout(int width, MessageElement::Flags _flags) this->container.begin(width, this->scale, messageFlags); for (const std::unique_ptr &element : this->message->getElements()) { - BenchmarkGuard guard("addelement"); - element->addToContainer(this->container, _flags); }