vcl/source/treelist/svtabbx.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 0dcebde891619b4dcb4c0d170b3b5919ac6750c8
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Thu Jul 28 14:01:53 2022 +0200
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Jul 28 15:44:53 2022 +0200

    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 <serval2...@yahoo.fr>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

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();

Reply via email to