mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
SystemMonitor: Pass the correct parent when checking for selected values
This will cause trouble later when the row is not enough to identify a selection.
This commit is contained in:
parent
9df21a1385
commit
0e71c6a7de
Notes:
sideshowbarker
2024-07-17 14:20:33 +09:00
Author: https://github.com/kleinesfilmroellchen
Commit: 0e71c6a7de
Pull-request: https://github.com/SerenityOS/serenity/pull/13516
Issue: https://github.com/SerenityOS/serenity/issues/65
1 changed files with 2 additions and 2 deletions
|
@ -416,14 +416,14 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto selected_id = [&](ProcessModel::Column column) -> pid_t {
|
||||
if (process_table_view.selection().is_empty())
|
||||
return -1;
|
||||
auto pid_index = process_table_view.model()->index(process_table_view.selection().first().row(), column);
|
||||
auto pid_index = process_table_view.model()->index(process_table_view.selection().first().row(), column, process_table_view.selection().first().parent());
|
||||
return pid_index.data().to_i32();
|
||||
};
|
||||
|
||||
auto selected_name = [&](ProcessModel::Column column) -> String {
|
||||
if (process_table_view.selection().is_empty())
|
||||
return {};
|
||||
auto pid_index = process_table_view.model()->index(process_table_view.selection().first().row(), column);
|
||||
auto pid_index = process_table_view.model()->index(process_table_view.selection().first().row(), column, process_table_view.selection().first().parent());
|
||||
return pid_index.data().to_string();
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue