summaryrefslogtreecommitdiff
path: root/Userland/Applications/SystemMonitor
diff options
context:
space:
mode:
authorkleines Filmröllchen <filmroellchen@serenityos.org>2022-04-05 00:25:14 +0200
committerAndreas Kling <kling@serenityos.org>2022-04-06 12:47:50 +0200
commit0e71c6a7de2f0fffca390a5893875560e1dfb423 (patch)
treec81457fbde19d89d601291231845cba7a99e70be /Userland/Applications/SystemMonitor
parent9df21a1385da4ba27f7ee4f85ffbe65ff5765346 (diff)
downloadserenity-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.cpp4
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();
};