commit 772f2a28414dae7765486ad7aff042e4299c7fb7
Author: Juergen Spitzmueller <[email protected]>
Date:   Wed Nov 20 14:07:05 2019 +0100

    GuiSelectionManager: fix getSelectedIndex for availableLV
---
 src/frontends/qt/GuiSelectionManager.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/frontends/qt/GuiSelectionManager.cpp 
b/src/frontends/qt/GuiSelectionManager.cpp
index d77acba..df43d0c 100644
--- a/src/frontends/qt/GuiSelectionManager.cpp
+++ b/src/frontends/qt/GuiSelectionManager.cpp
@@ -117,7 +117,7 @@ void GuiSelectionManager::updateButtons()
 
 QModelIndex GuiSelectionManager::getSelectedIndex(int const c) const
 {
-       QModelIndexList avail = availableLV->selectionModel()->selectedRows(c);
+       QModelIndexList avail = 
availableLV->selectionModel()->selectedIndexes();
        QModelIndexList sel   = selectedLV->selectionModel()->selectedRows(c);
        bool const have_avl = !avail.isEmpty();
        bool const have_sel = !sel.isEmpty();
@@ -126,11 +126,11 @@ QModelIndex GuiSelectionManager::getSelectedIndex(int 
const c) const
                if (have_sel)
                        return sel.front();
                if (have_avl)
-                       return avail.front();
+                       return avail.first();
        }
        else { // available has focus
                if (have_avl)
-                       return avail.front();
+                       return avail.first();
                if (have_sel)
                        return sel.front();
        }
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to