on xenial help sign in
uncheck non multiselect better
commitdfdc6dc959aad95a80d1e5a1ee9564f985fca60a authorAlbert Astals Cid <albert.astals@canonical.com> dateThu 8 Oct 2015, 12:37 (11 years ago) parent2cb896d
1 file changed+4−1
tests/mocks/Unity/fake_optionselectoroptions.cpp+4−1
tests/mocks/Unity/fake_optionselectoroptions.cpp+4−1
@@ -55,7 +55,10 @@ void FakeOptionSelectorOptions::setChecked(int row, bool checked)
5555{
5656 if (checked) {
5757 if (!static_cast<FakeOptionSelectorFilter*>(parent())->multiSelect()) {
58− m_checkedIndexes.clear();
58+ if (!m_checkedIndexes.isEmpty()) {
59+ setChecked(*m_checkedIndexes.begin(), false);
60+ }
61+ Q_ASSERT(m_checkedIndexes.isEmpty());
5962 }
6063 m_checkedIndexes << row;
6164 } else {