DriveSetup: Preserve focus on rescan

Before, pressing Disk->Rescan would keep the previous item selected but
move the keyboard focus to the first element.

Change-Id: Iff99bff64bd67128834a1021dc63f1801ecb4c92
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6264
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Zardshard
2023-03-28 15:32:10 +00:00
committed by waddlesplash
parent 502309ab5a
commit b014491b88
+1 -1
View File
@@ -566,7 +566,7 @@ MainWindow::_ScanDrives()
PartitionListRow* previousSelection
= fListView->FindRow(fCurrentPartitionID);
if (previousSelection) {
fListView->AddToSelection(previousSelection);
fListView->SetFocusRow(previousSelection, true);
_UpdateMenus(fCurrentDisk, fCurrentPartitionID,
previousSelection->ParentID());
fDiskView->ForceUpdate();