diff --git a/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp b/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp index dcd525bfac1f..59b73660f4ee 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp @@ -784,7 +784,7 @@ void TaskSketcherElements::slotElementsChanged(void) int currentRow = -1; auto currentIndex = ui->elementsWidget->currentIndex(); - if (currentIndex.isValid()) + if (currentIndex.isValid() && ui->elementsWidget->currentItem()->isSelected()) currentRow = currentIndex.row(); ui->elementsWidget->blockSignals(true);