summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-07-28 14:01:53 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2022-08-19 17:02:23 +0200
commit17c49046b58c981cee58876567c3884ae488638f (patch)
tree3cb2bf99f1c327b77b21952bd819268710551b2a /vcl
parent3ceec374808deba8af8316caaf37e3664093c158 (diff)
tdf#150181 vcl: first column is editable by default in SvTabListBox
(regression from commit fe38553aef2121f358fb58e450ec69314aad851e) Change-Id: I58e1afb228dfd87b7d642ccf1b58277960f01e14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137561 Tested-by: Jenkins Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 0dcebde891619b4dcb4c0d170b3b5919ac6750c8)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/treelist/svtabbx.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index 273156fc6d88..6e37eb3bd165 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -119,6 +119,7 @@ void SvTabListBox::dispose()
void SvTabListBox::SetTabs(sal_uInt16 nTabs, long const pTabPositions[], MapUnit eMapUnit)
{
+ assert(0 < nTabs);
mvTabList.resize(nTabs);
MapMode aMMSource( eMapUnit );
@@ -132,6 +133,8 @@ void SvTabListBox::SetTabs(sal_uInt16 nTabs, long const pTabPositions[], MapUnit
mvTabList[nIdx].SetPos( nNewTab );
mvTabList[nIdx].nFlags &= MYTABMASK;
}
+ // by default, 1st one is editable, others not; override with set_column_editables
+ mvTabList[0].nFlags |= SvLBoxTabFlags::EDITABLE;
SvTreeListBox::nTreeFlags |= SvTreeFlags::RECALCTABS;
if( IsUpdateMode() )
Invalidate();