diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-07-22 16:19:02 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-08-19 16:39:52 +0200 |
commit | 3ceec374808deba8af8316caaf37e3664093c158 (patch) | |
tree | 0e220874f67ad18ca8cf9cc82a98853f1f8a0632 /vcl | |
parent | b7d7429401ea41edc35df1e4447c53783e392f79 (diff) |
vcl: allow editing a column other than the first one in SvTabListBox
There are 2 members mvTabList and aTabs in SvTabListBox and
SvTreeListBox, and only aTabs is evaluated to determine which column
should be edited when calling start_editing().
This solution is probably not ideal; it would be better to have a
parameter to select the column because one might want multiple editable
columns with multiple buttons...
Also, the native GTK implementation has the same bug (but there
double-clicking the column works).
Change-Id: I727792e635d3b610a2132ee5f4155e3ee610aaf2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137362
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit fe38553aef2121f358fb58e450ec69314aad851e)
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/treelist/svtabbx.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx index add7452e3cd7..273156fc6d88 100644 --- a/vcl/source/treelist/svtabbx.cxx +++ b/vcl/source/treelist/svtabbx.cxx @@ -67,6 +67,16 @@ void SvTabListBox::SetTabs() } */ + // the 1st column (index 1 or 2 depending on button flags) is always set + // editable by SvTreeListBox::SetTabs(), + // which prevents setting a different column to editable as the first + // one with the flag is picked in SvTreeListBox::ImplEditEntry() + assert(aTabs.back()->nFlags & SvLBoxTabFlags::EDITABLE); + if (!(mvTabList[0].nFlags & SvLBoxTabFlags::EDITABLE)) + { + aTabs.back()->nFlags &= ~SvLBoxTabFlags::EDITABLE; + } + // append all other tabs to the list for( sal_uInt16 nCurTab = 1; nCurTab < sal_uInt16(mvTabList.size()); nCurTab++ ) { |