triggerbox UI: find TriggerEntry from Trigger

This commit is contained in:
Paul Davis 2025-10-25 15:26:22 -06:00
parent 8a66082429
commit 1ae056bfd8
2 changed files with 13 additions and 0 deletions

View file

@ -1126,6 +1126,18 @@ TriggerBoxUI::drag_data_received (Glib::RefPtr<Gdk::DragContext> const& context,
context->drag_finish (true, false, time);
}
TriggerEntry*
TriggerBoxUI::entry_by_trigger (Trigger const & trigger) const
{
for (auto & slot : _slots) {
if (slot->trigger().get() == &trigger) {
return slot;
}
}
return nullptr;
}
/* ********************************************** */
TriggerBoxWidget::TriggerBoxWidget (TriggerStrip& s, float w, float h)