Commit b3eb91d3 authored by Tomaz  Canabrava's avatar Tomaz Canabrava Committed by Tomaz Canabrava
Browse files

Store the current hotspot under mouse

This is important if the actions need to access it later on
parent 31a82152
......@@ -1854,11 +1854,11 @@ void SessionController::showDisplayContextMenu(const QPoint &position)
QList<QAction *> toRemove;
// prepend content-specific actions such as "Open Link", "Copy Email Address" etc
QSharedPointer<HotSpot> hotSpot = view()->filterActions(position);
if (hotSpot != nullptr) {
popup->insertActions(popup->actions().value(0, nullptr), hotSpot->actions() << contentSeparator);
_currentHotSpot = view()->filterActions(position);
if (_currentHotSpot != nullptr) {
popup->insertActions(popup->actions().value(0, nullptr), _currentHotSpot->actions() << contentSeparator);
popup->addAction(contentSeparator);
toRemove = hotSpot->setupMenu(popup.data());
toRemove = _currentHotSpot->setupMenu(popup.data());
// The action above can create an action for Open Folder With,
// for the selected folder, but then we have two different
......
......@@ -50,6 +50,7 @@ class SessionGroup;
class TerminalDisplay;
class UrlFilter;
class ColorFilter;
class HotSpot;
/**
* Provides the menu actions to manipulate a single terminal session and view pair.
......@@ -370,6 +371,8 @@ private:
EscapeSequenceUrlFilter *_escapedUrlFilter;
std::unique_ptr<KXMLGUIBuilder> _clientBuilder;
QSharedPointer<HotSpot> _currentHotSpot;
};
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment