diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-07-15 00:35:32 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-07-15 00:35:32 +0200 |
| commit | 092ea787f946abfc3ef9e72c600492157117797a (patch) | |
| tree | fa584bffd3e567c70b86d377241296ec2e18654f | |
| parent | 85e1761f3a1107b0b5988de3225d69b586a1c71b (diff) | |
| download | turns-092ea787f946abfc3ef9e72c600492157117797a.tar.xz turns-092ea787f946abfc3ef9e72c600492157117797a.zip | |
app/ui: fix wrong indices when editing or deleting
| -rw-r--r-- | app/src/widgets/participant_list_row.cpp | 9 |
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)); |
