diff options
author | kleines Filmröllchen <filmroellchen@serenityos.org> | 2022-04-05 00:25:14 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-06 12:47:50 +0200 |
commit | 0e71c6a7de2f0fffca390a5893875560e1dfb423 (patch) | |
tree | c81457fbde19d89d601291231845cba7a99e70be /Userland/Applications/SystemMonitor | |
parent | 9df21a1385da4ba27f7ee4f85ffbe65ff5765346 (diff) | |
download | serenity-0e71c6a7de2f0fffca390a5893875560e1dfb423.zip |
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.
Diffstat (limited to 'Userland/Applications/SystemMonitor')
-rw-r--r-- | Userland/Applications/SystemMonitor/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/SystemMonitor/main.cpp b/Userland/Applications/SystemMonitor/main.cpp index 53ab6eda2f..30f6beaade 100644 --- a/Userland/Applications/SystemMonitor/main.cpp +++ b/Userland/Applications/SystemMonitor/main.cpp @@ -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(); }; |