From 1abe572c5bac5fcc1328286981e7e58f0f7a30f8 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Fri, 27 Oct 2023 01:49:29 -0400 Subject: convert menu path from filter to child immediately --- src/components/channellist/channellisttree.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/components') diff --git a/src/components/channellist/channellisttree.cpp b/src/components/channellist/channellisttree.cpp index b9b5c08..2a4970d 100644 --- a/src/components/channellist/channellisttree.cpp +++ b/src/components/channellist/channellisttree.cpp @@ -1120,7 +1120,9 @@ void ChannelListTree::OnMessageCreate(const Message &msg) { bool ChannelListTree::OnButtonPressEvent(GdkEventButton *ev) { if (ev->button == GDK_BUTTON_SECONDARY && ev->type == GDK_BUTTON_PRESS) { if (m_view.get_path_at_pos(static_cast(ev->x), static_cast(ev->y), m_path_for_menu)) { - auto row = (*m_filter_model->get_iter(m_path_for_menu)); + m_path_for_menu = m_filter_model->convert_path_to_child_path(m_path_for_menu); + if (!m_path_for_menu) return true; + auto row = (*m_model->get_iter(m_path_for_menu)); switch (static_cast(row[m_columns.m_type])) { case RenderType::Guild: OnGuildSubmenuPopup(); -- cgit v1.2.3