From b9845e1d23eb23380f447692e3a813413e897c2d Mon Sep 17 00:00:00 2001 From: Anthony Bilinski Date: Sat, 27 Jan 2018 20:00:43 -0800 Subject: [PATCH] perf(widget): don't save on setExpanded if categorywidget is unchanged Fix #4932 --- src/widget/categorywidget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/widget/categorywidget.cpp b/src/widget/categorywidget.cpp index 0f15babc3..fa4dbce00 100644 --- a/src/widget/categorywidget.cpp +++ b/src/widget/categorywidget.cpp @@ -81,6 +81,9 @@ bool CategoryWidget::isExpanded() const void CategoryWidget::setExpanded(bool isExpanded, bool save) { + if (expanded == isExpanded) { + return; + } expanded = isExpanded; setMouseTracking(true); listWidget->setVisible(isExpanded);