From 4796ee0c394ee002408ba392b750d34d90a2b459 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 10 Mar 2015 10:50:18 -0700 Subject: Don't call enableEdition() every time a change is made We only need to do this once. Signed-off-by: Dirk Hohndel --- qt-ui/simplewidgets.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index f9deabd3c..027fd9ad3 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -768,7 +768,8 @@ void LocationInformationWidget::markChangedWidget(QWidget *w) { QPalette p; qreal h, s, l, a; - enableEdition(); + if (!modified) + enableEdition(); qApp->palette().color(QPalette::Text).getHslF(&h, &s, &l, &a); p.setBrush(QPalette::Base, (l <= 0.3) ? QColor(Qt::yellow).lighter() : (l <= 0.6) ? QColor(Qt::yellow).light() : /* else */ QColor(Qt::yellow).darker(300)); w->setPalette(p); -- cgit v1.2.3-70-g09d2