dbaccess/source/ui/app/AppDetailView.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 15e75a08a237ea372170b3ef826e9efae4323a56
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Aug 17 09:59:29 2020 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Aug 18 12:17:38 2020 +0200

    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 <caol...@redhat.com>

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();
 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to