diff options
Diffstat (limited to 'vcl/source/app/salvtables.cxx')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index e00adc86f6a5..5125af466f6b 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -3202,6 +3202,7 @@ private: o3tl::sorted_vector<SvTreeListEntry*> m_aExpandingPlaceHolderParents; // which columns should be custom rendered o3tl::sorted_vector<int> m_aCustomRenders; + bool m_bTogglesAsRadio; bool m_bDisableCheckBoxAutoWidth; int m_nSortColumn; @@ -3329,6 +3330,7 @@ public: , m_xTreeView(pTreeView) , m_aCheckButtonData(pTreeView, false) , m_aRadioButtonData(pTreeView, true) + , m_bTogglesAsRadio(false) , m_bDisableCheckBoxAutoWidth(false) , m_nSortColumn(-1) { @@ -3814,10 +3816,13 @@ public: return ::get_toggle(rVclIter.iter, col); } + virtual void set_toggle_columns_as_radio() override + { + m_bTogglesAsRadio = true; + } + void set_toggle(SvTreeListEntry* pEntry, TriState eState, int col) { - bool bRadio = std::find(m_aRadioIndexes.begin(), m_aRadioIndexes.end(), col) - != m_aRadioIndexes.end(); ++col; //skip dummy/expander column // blank out missing entries @@ -3826,7 +3831,7 @@ public: if (static_cast<size_t>(col) == pEntry->ItemCount()) { - SvLBoxButtonData* pData = bRadio ? &m_aRadioButtonData : &m_aCheckButtonData; + SvLBoxButtonData* pData = m_bTogglesAsRadio ? &m_aRadioButtonData : &m_aCheckButtonData; // if we want to have the implicit auto-sizing of the checkbox // column we need to call EnableCheckButton and CheckBoxInserted to |