Store the current hotspot under mouse

This is important if the actions need to access it later on
wilder
Tomaz Canabrava 4 years ago committed by Tomaz Canabrava
parent 31a82152c3
commit b3eb91d3f7
  1. 8
      src/session/SessionController.cpp
  2. 3
      src/session/SessionController.h

@ -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;
};
}

Loading…
Cancel
Save