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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user