Commit 4503e7ef authored by Tomaz  Canabrava's avatar Tomaz Canabrava
Browse files

Do not delete the Open With action

But change the title so it matches what we want to do
parent 38bb7aa2
Pipeline #115836 passed with stage
in 1 minute and 51 seconds
......@@ -1852,12 +1852,15 @@ void SessionController::showDisplayContextMenu(const QPoint &position)
popup->addAction(contentSeparator);
toRemove = hotSpot->setupMenu(popup.data());
// Can happen if we click on a right click, on a folder.
// if this happens, we need to remove this action as we have
// already added the action before this if.
if (toRemove[0]->text() == i18n("&Open Folder With")) {
delete toRemove[0];
toRemove.removeFirst();
// The action above can create an action for Open Folder With,
// for the selected folder, but then we have two different
// Open Folder With - with different folders on each.
// Change the text of the second one, that points to the
// current folder.
for (auto *action : neu) {
if (action->objectName() == QStringLiteral("openWith_submenu")) {
action->setText(i18n("Open Current Folder With"));
}
}
toRemove = toRemove + neu;
} else {
......
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