From 29fbe334377a04c4f051dbcb348e9e3b474a903c Mon Sep 17 00:00:00 2001 From: fourtf Date: Fri, 6 Apr 2018 01:57:32 +0200 Subject: [PATCH] repaint tabs when text changes --- src/widgets/helper/notebooktab.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/widgets/helper/notebooktab.cpp b/src/widgets/helper/notebooktab.cpp index f03c2ea93..de26c24c7 100644 --- a/src/widgets/helper/notebooktab.cpp +++ b/src/widgets/helper/notebooktab.cpp @@ -103,9 +103,13 @@ QString NotebookTab::getTitle() const void NotebookTab::setTitle(const QString &newTitle) { - this->title = newTitle.toStdString(); + auto stdTitle = newTitle.toStdString(); - this->updateSize(); + if (this->title != stdTitle) { + this->title = stdTitle; + this->updateSize(); + this->update(); + } } bool NotebookTab::isSelected() const