From 303f231ea5eda450a40c7dc88aea6fdd1b109bb6 Mon Sep 17 00:00:00 2001 From: DavidXanatos Date: Thu, 22 Sep 2022 09:28:49 +0200 Subject: [PATCH] Update RecoveryWindow.cpp --- SandboxiePlus/SandMan/Windows/RecoveryWindow.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/SandboxiePlus/SandMan/Windows/RecoveryWindow.cpp b/SandboxiePlus/SandMan/Windows/RecoveryWindow.cpp index ec5f9b51..c1f82368 100644 --- a/SandboxiePlus/SandMan/Windows/RecoveryWindow.cpp +++ b/SandboxiePlus/SandMan/Windows/RecoveryWindow.cpp @@ -327,6 +327,18 @@ int CRecoveryWindow::FindFiles() m_pFileModel->Sync(m_FileMap); ui.treeFiles->expandAll(); + + /*for (int i = 0; i < m_pFileModel->rowCount(); ++i) + { + QModelIndex ModelIndex = m_pFileModel->index(i, 0); + QVariant ID = m_pFileModel->GetItemID(ModelIndex); + }*/ + + QModelIndex Index = m_pFileModel->index(0, 0); + QModelIndex ModelIndex = m_pSortProxy->mapFromSource(Index); + ui.treeFiles->selectionModel()->setCurrentIndex(ModelIndex, QItemSelectionModel::SelectCurrent); + ui.treeFiles->setCurrentIndex(ModelIndex); + return Count; }