From 0dcebde891619b4dcb4c0d170b3b5919ac6750c8 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 28 Jul 2022 14:01:53 +0200 Subject: tdf#150181 vcl: first column is editable by default in SvTabListBox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (regression from commit fe38553aef2121f358fb58e450ec69314aad851e) Change-Id: I58e1afb228dfd87b7d642ccf1b58277960f01e14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137561 Tested-by: Jenkins Tested-by: Julien Nabet Reviewed-by: Caolán McNamara --- vcl/source/treelist/svtabbx.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vcl') diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx index f1277eafd41a..25ef3e4f62d4 100644 --- a/vcl/source/treelist/svtabbx.cxx +++ b/vcl/source/treelist/svtabbx.cxx @@ -205,6 +205,7 @@ void SvTabListBox::dispose() void SvTabListBox::SetTabs(sal_uInt16 nTabs, tools::Long const pTabPositions[], MapUnit eMapUnit) { + assert(0 < nTabs); mvTabList.resize(nTabs); MapMode aMMSource( eMapUnit ); @@ -218,6 +219,8 @@ void SvTabListBox::SetTabs(sal_uInt16 nTabs, tools::Long const pTabPositions[], 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(); -- cgit