mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 00:38:48 +00:00
SystemMonitor: Fix PID selection after GModelSelection changes
This commit is contained in:
parent
98a68c82bc
commit
9c1fa0bd51
Notes:
sideshowbarker
2024-07-19 12:13:41 +09:00
Author: https://github.com/awesomekling
Commit: 9c1fa0bd51
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue