summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2024-07-15 00:35:32 +0200
committerFelix Morgner <felix.morgner@gmail.com>2024-07-15 00:35:32 +0200
commit092ea787f946abfc3ef9e72c600492157117797a (patch)
treefa584bffd3e567c70b86d377241296ec2e18654f /app
parent85e1761f3a1107b0b5988de3225d69b586a1c71b (diff)
downloadturns-092ea787f946abfc3ef9e72c600492157117797a.tar.xz
turns-092ea787f946abfc3ef9e72c600492157117797a.zip
app/ui: fix wrong indices when editing or deleting
Diffstat (limited to 'app')
-rw-r--r--app/src/widgets/participant_list_row.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/src/widgets/participant_list_row.cpp b/app/src/widgets/participant_list_row.cpp
index 94350f8..e0f9206 100644
--- a/app/src/widgets/participant_list_row.cpp
+++ b/app/src/widgets/participant_list_row.cpp
@@ -24,12 +24,9 @@ namespace turns::app::widgets
m_title = get_widget<Gtk::Label>("title");
m_toggle_defeated = get_widget<Gtk::ToggleButton>("toggle_defeated");
- signal_map().connect([this]{
- m_delete->set_action_target_value(Glib::Variant<int>::create(get_index()));
- m_delete->set_action_name("win.delete");
- m_edit->set_action_target_value(Glib::Variant<int>::create(get_index()));
- m_edit->set_action_name("win.edit");
- });
+ m_edit->signal_clicked().connect([this] { activate_action("win.edit", Glib::Variant<int>::create(get_index())); });
+
+ m_delete->signal_clicked().connect([this] { activate_action("win.delete", Glib::Variant<int>::create(get_index())); });
m_toggle_defeated->set_tooltip_text(_("Mark as defeated"));
m_toggle_defeated->signal_toggled().connect(sigc::mem_fun(*this, &participant_list_row::handle_toggle_defeated));