mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
recover WebView context menu
This commit is contained in:
parent
8b8743a1e8
commit
a16d2ea4c0
@ -53,7 +53,7 @@ void VWebView::contextMenuEvent(QContextMenuEvent *p_event)
|
|||||||
const QList<QAction *> actions = menu->actions();
|
const QList<QAction *> actions = menu->actions();
|
||||||
QAction *firstAction = actions.isEmpty() ? NULL : actions[0];
|
QAction *firstAction = actions.isEmpty() ? NULL : actions[0];
|
||||||
|
|
||||||
bool selection = hasSelection();
|
bool selection = hasSelection() && !selectedText().isEmpty();
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
if (!m_copyImageUrlActionHooked) {
|
if (!m_copyImageUrlActionHooked) {
|
||||||
@ -99,11 +99,6 @@ void VWebView::contextMenuEvent(QContextMenuEvent *p_event)
|
|||||||
menu->insertSeparator(firstAction);
|
menu->insertSeparator(firstAction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QAction *savePageAct = new QAction(QWebPage::tr("Save &Page"), menu);
|
|
||||||
connect(savePageAct, &QAction::triggered,
|
|
||||||
this, &VWebView::requestSavePage);
|
|
||||||
menu->addAction(savePageAct);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user