diff --git a/src/dialogs/VersionInfoDialog.cpp b/src/dialogs/VersionInfoDialog.cpp index 75baba211..108821c0e 100644 --- a/src/dialogs/VersionInfoDialog.cpp +++ b/src/dialogs/VersionInfoDialog.cpp @@ -77,10 +77,9 @@ void VersionInfoDialog::clearSelectionOnClose() ui->rightTreeWidget->clearSelection(); // remove default "current" item selection after dialog close - auto model = ui->leftTreeWidget->model(); - ui->leftTreeWidget->setCurrentIndex(model->index(-1, -1)); - model = ui->rightTreeWidget->model(); - ui->leftTreeWidget->setCurrentIndex(model->index(-1, -1)); + QModelIndex defaultIndex; + ui->leftTreeWidget->setCurrentIndex(defaultIndex); + ui->rightTreeWidget->setCurrentIndex(defaultIndex); } void VersionInfoDialog::CopyTreeWidgetSelection(QTreeWidget *t)