diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-03-10 10:50:18 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-03-10 10:50:18 -0700 |
commit | 4796ee0c394ee002408ba392b750d34d90a2b459 (patch) | |
tree | 9caea5db46a2569b0fb92d09b38ad1820d851cd6 /qt-ui | |
parent | 2c2adacb902cf4c5e385dd4d82068ad00a8eae4c (diff) | |
download | subsurface-4796ee0c394ee002408ba392b750d34d90a2b459.tar.gz |
Don't call enableEdition() every time a change is made
We only need to do this once.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/simplewidgets.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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); |