[apps/shared] Avoid potential useless redrawing in function expression

view

Change-Id: I2e28b339879a51d0688ccf426ad8dd03c734d954
This commit is contained in:
Émilie Feral
2017-04-13 18:47:50 +02:00
parent c9ec9e0a4c
commit a6f204d406

View File

@@ -25,8 +25,10 @@ void FunctionExpressionCell::setEven(bool even) {
}
void FunctionExpressionCell::setHighlighted(bool highlight) {
EvenOddCell::setHighlighted(highlight);
m_expressionView.setBackgroundColor(backgroundColor());
if (highlight != EvenOddCell::isHighlighted()) {
EvenOddCell::setHighlighted(highlight);
m_expressionView.setBackgroundColor(backgroundColor());
}
}
int FunctionExpressionCell::numberOfSubviews() const {