diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-18 16:28:03 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-10-19 11:17:50 +0200 |
commit | 8aaeea3c505c59bb2509924b527434ccf4152598 (patch) | |
tree | 073d29b3102b9592d6acca9fd98205f917f203a9 /fpicker | |
parent | Related: tdf#145169 change to selected dir on remote "save" (diff) | |
download | core-8aaeea3c505c59bb2509924b527434ccf4152598.tar.gz core-8aaeea3c505c59bb2509924b527434ccf4152598.zip |
Resolves: tdf#145169 only position treeview cursor at the first entry
when the view is filled, don't actually select the entry.
With these single selection trees the default is to select when the
cursor is positioned, so move the unselect to after the cursor
positioning to achieve this.
Now nothing is considered "selected" in the view unless the user
explicitly does that so the contents of the entry are used by default
on save/load because nothing is selected in the treeview unless the
user does that.
Change-Id: I2a740616205bab35614f85f62e8240cd11df90ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123772
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/fileview.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fpicker/source/office/fileview.cxx b/fpicker/source/office/fileview.cxx index 87d134c3edbd..d8e8ce6f7d72 100644 --- a/fpicker/source/office/fileview.cxx +++ b/fpicker/source/office/fileview.cxx @@ -1387,25 +1387,25 @@ void SvtFileView_Impl::ResetCursor() { if (mxView->get_visible()) { - // deselect - mxView->unselect_all(); std::unique_ptr<weld::TreeIter> xFirst = mxView->make_iterator(); if (mxView->get_iter_first(*xFirst)) { // set cursor to the first entry mxView->set_cursor(*xFirst); } + // deselect + mxView->unselect_all(); } else { - // deselect - mxIconView->unselect_all(); std::unique_ptr<weld::TreeIter> xFirst = mxIconView->make_iterator(); if (mxIconView->get_iter_first(*xFirst)) { // set cursor to the first entry mxIconView->set_cursor(*xFirst); } + // deselect + mxIconView->unselect_all(); } } |