on xenial help sign in
Implement single selection in the options when checking
816a6cfAlbert Astals Cid
tests/mocks/Unity/fake_optionselectoroptions.cpp+3
@@ -54,6 +54,9 @@ QVariant FakeOptionSelectorOptions::data(const QModelIndex &index, int role) con
54void FakeOptionSelectorOptions::setChecked(int row, bool checked)
54void FakeOptionSelectorOptions::setChecked(int row, bool checked)
55{
55{
56 if (checked) {
56 if (checked) {
57+ if (!static_cast<FakeOptionSelectorFilter*>(parent())->multiSelect()) {
58+ m_checkedIndexes.clear();
59+ }
57 m_checkedIndexes << row;
60 m_checkedIndexes << row;
58 } else {
61 } else {
59 m_checkedIndexes.remove(row);
62 m_checkedIndexes.remove(row);