From fbc41ecc66201f80678357ae26cd570eb531efe1 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Tue, 19 Nov 2019 13:47:32 +0100 Subject: [PATCH] Fix crash in selection manager Patch by Patrick De Visschere --- src/frontends/qt/GuiSelectionManager.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/frontends/qt/GuiSelectionManager.cpp b/src/frontends/qt/GuiSelectionManager.cpp index 4a735ed2d6..d77acbadc6 100644 --- a/src/frontends/qt/GuiSelectionManager.cpp +++ b/src/frontends/qt/GuiSelectionManager.cpp @@ -285,14 +285,14 @@ void GuiSelectionManager::addPB_clicked() return; QModelIndex const idxToAdd = selIdx.first(); - QModelIndex const idx = selectedLV->currentIndex(); int const srows = selectedModel->rowCount(); QMap qm = availableModel->itemData(idxToAdd); insertRowToSelected(srows, qm); selectionChanged(); //signal - + + QModelIndex const idx = selectedLV->currentIndex(); if (idx.isValid()) selectedLV->setCurrentIndex(idx); @@ -344,8 +344,7 @@ void GuiSelectionManager::upPB_clicked() selectedModel->removeRow(pos); insertRowToSelected(pos - 1, qms); - selectionChanged(); //signal - + idx = selIdx.first(); selectedLV->setCurrentIndex(idx.sibling(idx.row() - 1, idx.column())); selectedHasFocus_ = true; updateHook(); @@ -372,8 +371,7 @@ void GuiSelectionManager::downPB_clicked() selectedModel->removeRow(pos); insertRowToSelected(pos + 1, qms); - selectionChanged(); //signal - + idx = selIdx.first(); selectedLV->setCurrentIndex(idx.sibling(idx.row() + 1, idx.column())); selectedHasFocus_ = true; updateHook(); -- 2.39.5