When showing a context menu on a clickable, we used to hide existing
context menu item to avoid confusing the user. However, those actions
were never unhidden again. This resulted in the context menu not showing
most options ever again in subsequent invocations.
Instead of hiding the actions, we now just clear the menu.
break;
case Clickable::Channel:
{
- // Hide existing menu actions, they confuse us when right-clicking on a clickable
- foreach(QAction *action, menu->actions())
- action->setVisible(false);
+ // Remove existing menu actions, they confuse us when right-clicking on a clickable
+ menu->clear();
QString name = data(ChatLineModel::DisplayRole).toString().mid(click.start(), click.length());
GraphicalUi::contextMenuActionProvider()->addActions(menu, chatScene()->filter(), data(MessageModel::BufferIdRole).value<BufferId>(), name);
break;