Ticket #4414: 0001-DriveSetup-moves-focus-row-with-selection.patch

File 0001-DriveSetup-moves-focus-row-with-selection.patch, 943 bytes (added by Janus, 4 years ago)
  • src/apps/drivesetup/MainWindow.cpp

    From c93fcd7496c339836953650f604948bd656e2c91 Mon Sep 17 00:00:00 2001
    From: Janus <janus2@ymail.com>
    Date: Mon, 4 May 2015 18:50:11 +0200
    Subject: [PATCH] DriveSetup: moves focus row with selection.
    
    * Fixes #4414.
    ---
     src/apps/drivesetup/MainWindow.cpp | 5 ++++-
     1 file changed, 4 insertions(+), 1 deletion(-)
    
    diff --git a/src/apps/drivesetup/MainWindow.cpp b/src/apps/drivesetup/MainWindow.cpp
    index 2820c7a..874e7a8 100644
    a b MainWindow::MessageReceived(BMessage* message) 
    419419            if (message->FindInt32("partition_id", &id) == B_OK) {
    420420                if (BRow* row = fListView->FindRow(id)) {
    421421                    fListView->DeselectAll();
    422                     fListView->AddToSelection(row);
     422                    BRow *focusRow = fListView->FocusRow();
     423                    fListView->SetFocusRow(row, true);
     424                    if (focusRow != row)
     425                        break;
    423426                    _AdaptToSelectedPartition();
    424427                }
    425428            }