Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
b3eb91d3
Commit
b3eb91d3
authored
Jan 21, 2022
by
Tomaz Canabrava
Committed by
Tomaz Canabrava
Feb 05, 2022
Browse files
Store the current hotspot under mouse
This is important if the actions need to access it later on
parent
31a82152
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/session/SessionController.cpp
View file @
b3eb91d3
...
...
@@ -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
>
h
otSpot
=
view
()
->
filterActions
(
position
);
if
(
h
otSpot
!=
nullptr
)
{
popup
->
insertActions
(
popup
->
actions
().
value
(
0
,
nullptr
),
h
otSpot
->
actions
()
<<
contentSeparator
);
_currentH
otSpot
=
view
()
->
filterActions
(
position
);
if
(
_currentH
otSpot
!=
nullptr
)
{
popup
->
insertActions
(
popup
->
actions
().
value
(
0
,
nullptr
),
_currentH
otSpot
->
actions
()
<<
contentSeparator
);
popup
->
addAction
(
contentSeparator
);
toRemove
=
h
otSpot
->
setupMenu
(
popup
.
data
());
toRemove
=
_currentH
otSpot
->
setupMenu
(
popup
.
data
());
// The action above can create an action for Open Folder With,
// for the selected folder, but then we have two different
...
...
src/session/SessionController.h
View file @
b3eb91d3
...
...
@@ -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
;
};
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment