Implement single selection in the options when checking
commit816a6cf95a11da9a71f74d1eabcd2c39a93f9d66
authorAlbert Astals Cid <albert.astals@canonical.com>
dateFri 2 Oct 2015, 13:19 (11 years ago)
parent77f3353
tests/mocks/Unity/fake_optionselectoroptions.cpp+3
@@ -54,6 +54,9 @@ QVariant FakeOptionSelectorOptions::data(const QModelIndex &index, int role) con
5454void FakeOptionSelectorOptions::setChecked(int row, bool checked)
5555{
5656 if (checked) {
57+ if (!static_cast<FakeOptionSelectorFilter*>(parent())->multiSelect()) {
58+ m_checkedIndexes.clear();
59+ }
5760 m_checkedIndexes << row;
5861 } else {
5962 m_checkedIndexes.remove(row);