Summary: | Navigator: Ctrl+Minus collapses the whole Headings tree, not the selected node | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Mike Kaganski <mikekaganski> |
Component: | Writer | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | buzea.bogdan, raykowj, vsfoote |
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | target:7.6.0 target:7.5.0.0.beta2 | ||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 103030 |
Description
Mike Kaganski
2022-12-15 09:51:21 UTC
[Ctrl]+[+] and [Ctrl]+[-] aren't handled by SwContentTree directly but are passed through to welded TreeView backends. Gtk3 doesn't do anything for these. For gen type backends, [Ctrl]+[-] is handled here[1]. [1] https://opengrok.libreoffice.org/xref/core/vcl/source/treelist/svimpbox.cxx?r=5f9cd841#2393 I should have checked the history there. It's seems I made this behavior. So, what is the recommended behavior for [Ctrl]+[-]? Perhaps collapse all sub nodes along with the current node? (In reply to Jim Raykowski from comment #2) > So, what is the recommended behavior for [Ctrl]+[-]? Perhaps collapse all > sub nodes along with the current node? The currently selected node must stay selected, but all its children must be collapsed *recursively*, so that the selected node must get the [+] icon at the left, and all its (now hidden) children also must have [+] if they have subchildren - so when you later press [+] at the parent, the previously expanded children show collapsed. (In reply to Mike Kaganski from comment #3) > The currently selected node must stay selected, but all its children must be > collapsed *recursively*, so that the selected node must get the [+] icon at > the left, and all its (now hidden) children also must have [+] if they have > subchildren - so when you later press [+] at the parent, the previously > expanded children show collapsed. I think effort here does this: https://gerrit.libreoffice.org/c/core/+/144286 (In reply to Jim Raykowski from comment #4) > https://gerrit.libreoffice.org/c/core/+/144286 Thanks! Interesting, why the styles list behaves as expected - does it duplicate the code? (In reply to Mike Kaganski from comment #5) > Interesting, why the styles list behaves as expected - does it duplicate the > code? Yes, very interesting. It seems the styles list uses nullptr as the parent for all entries[1] which makes[2] work as expected because of[3]. [1] https://opengrok.libreoffice.org/xref/core/sfx2/source/dialog/StyleList.cxx?r=ef862ba4#949 [2] https://opengrok.libreoffice.org/xref/core/vcl/source/treelist/svimpbox.cxx?r=5f9cd841#2393 [3] https://opengrok.libreoffice.org/xref/core/vcl/source/treelist/treelist.cxx?r=6e2bd112&mo=29042&fi=1020#1020 (In reply to Jim Raykowski from comment #6) > Yes, very interesting. It seems the styles list uses nullptr as the parent > for all entries[1] which makes[2] work as expected because of[3]. > > [1] > https://opengrok.libreoffice.org/xref/core/sfx2/source/dialog/StyleList. > cxx?r=ef862ba4#949 > [2] > https://opengrok.libreoffice.org/xref/core/vcl/source/treelist/svimpbox. > cxx?r=5f9cd841#2393 > [3] > https://opengrok.libreoffice.org/xref/core/vcl/source/treelist/treelist. > cxx?r=6e2bd112&mo=29042&fi=1020#1020 After further investigation, it seems there is something not right with SvTreeList::GetRootLevelParent. The only place I could find it called from is[2]. TreeListBox::GetRootLevelParent seems correct though[4]. [4] https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/control/dbtreelistbox.cxx?r=5f6596bd#485 Jim Raykowski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/eef94d7b4360e17ba21577fe52bd60214bd5280c tdf#152517 Fix gen backend treeview ctrl+minus behavior It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Jim Raykowski committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/ffd8d368b3a780c7b687512540821ad52f2db457 tdf#152517 Fix gen backend treeview ctrl+minus behavior It will be available in 7.5.0.0.beta2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Bit late in setting this one as fixed. It appears to be working as expected in: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 80a0d3b44cd6edb6419ab66588548ba169f2567b CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: x11 Locale: en-US (C); UI: en-US Calc: threaded |