diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-09-07 19:59:03 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-09-07 19:59:03 +0200 |
commit | 9c1fa0bd518191c24dca49de11a91a3f81c87b9d (patch) | |
tree | 22aa0b39a5723b4079640a806ab7a99fdadfd43a /Applications | |
parent | 98a68c82bcdcbe10031596fcc1daa8c13a08a0ea (diff) | |
download | serenity-9c1fa0bd518191c24dca49de11a91a3f81c87b9d.zip |
SystemMonitor: Fix PID selection after GModelSelection changes
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/SystemMonitor/ProcessTableView.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Applications/SystemMonitor/ProcessTableView.cpp b/Applications/SystemMonitor/ProcessTableView.cpp index 50a080c118..5c599638a6 100644 --- a/Applications/SystemMonitor/ProcessTableView.cpp +++ b/Applications/SystemMonitor/ProcessTableView.cpp @@ -28,7 +28,7 @@ void ProcessTableView::refresh() pid_t ProcessTableView::selected_pid() const { - if (!model()->selected_index().is_valid()) + if (selection().is_empty()) return -1; - return model()->data(model()->index(model()->selected_index().row(), ProcessModel::Column::PID), GModel::Role::Sort).as_int(); + return model()->data(model()->index(selection().first().row(), ProcessModel::Column::PID), GModel::Role::Sort).as_int(); } |