diff --git a/apps/regression/even_odd_double_buffer_text_cell_with_separator.cpp b/apps/regression/even_odd_double_buffer_text_cell_with_separator.cpp index de1dd0444..96fbe5b25 100644 --- a/apps/regression/even_odd_double_buffer_text_cell_with_separator.cpp +++ b/apps/regression/even_odd_double_buffer_text_cell_with_separator.cpp @@ -36,8 +36,7 @@ bool EvenOddDoubleBufferTextCellWithSeparator::firstTextSelected() { void EvenOddDoubleBufferTextCellWithSeparator::selectFirstText(bool selectFirstText) { m_firstTextSelected = selectFirstText; - m_firstBufferTextView.setHighlighted(selectFirstText); - m_secondBufferTextView.setHighlighted(!selectFirstText); + setHighlighted(isHighlighted()); } void EvenOddDoubleBufferTextCellWithSeparator::reloadCell() { @@ -46,16 +45,9 @@ void EvenOddDoubleBufferTextCellWithSeparator::reloadCell() { } void EvenOddDoubleBufferTextCellWithSeparator::setHighlighted(bool highlight) { - m_firstBufferTextView.setHighlighted(false); - m_secondBufferTextView.setHighlighted(false); HighlightCell::setHighlighted(highlight); - if (isHighlighted()) { - if (m_firstTextSelected) { - m_firstBufferTextView.setHighlighted(true); - } else { - m_secondBufferTextView.setHighlighted(true); - } - } + m_firstBufferTextView.setHighlighted(highlight && m_firstTextSelected); + m_secondBufferTextView.setHighlighted(highlight && !m_firstTextSelected); } void EvenOddDoubleBufferTextCellWithSeparator::setEven(bool even) {