diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-08-17 09:59:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-08-18 12:17:38 +0200 |
commit | 15e75a08a237ea372170b3ef826e9efae4323a56 (patch) | |
tree | 785d172c09f043e5fb4818cc584b54000d98aa4e /dbaccess | |
parent | e1aea22f3f4fbf0cc412a8867165a85a3c55f49c (diff) |
keep m_nCursorIndex updated with the most recent used entry
so right clicking on the tree keeps current entry selected on re-focus
in
Change-Id: I25ecb11b8fefbff6464e02936b2a669c34c42b8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100852
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/app/AppDetailView.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index 3430d0bebb77..640d5195a4df 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -75,10 +75,10 @@ void OTasksWindow::updateHelpText() IMPL_LINK(OTasksWindow, onSelected, weld::TreeView&, rTreeView, bool) { - int nCurEntry = rTreeView.get_cursor_index(); - assert(nCurEntry != -1 && "OTasksWindow::onSelected: invalid entry!"); + m_nCursorIndex = rTreeView.get_cursor_index(); + assert(m_nCursorIndex != -1 && "OTasksWindow::onSelected: invalid entry!"); URL aCommand; - aCommand.Complete = reinterpret_cast<TaskEntry*>(rTreeView.get_id(nCurEntry).toUInt64())->sUNOCommand; + aCommand.Complete = reinterpret_cast<TaskEntry*>(rTreeView.get_id(m_nCursorIndex).toUInt64())->sUNOCommand; getDetailView()->getBorderWin().getView()->getAppController().executeChecked( aCommand, Sequence< PropertyValue >() ); return true; @@ -105,6 +105,7 @@ IMPL_LINK_NOARG(OTasksWindow, FocusOutHdl, weld::Widget&, void) IMPL_LINK_NOARG(OTasksWindow, OnEntrySelectHdl, weld::TreeView&, void) { + m_nCursorIndex = m_xTreeView->get_cursor_index(); updateHelpText(); } |