mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
2c2adacb90
commit
4796ee0c39
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue