mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
Show save image option only when it is needed
This commit is contained in:
parent
bbebd6a5d7
commit
bc4691ceb4
4 changed files with 21 additions and 4 deletions
|
@ -979,8 +979,12 @@ void ChatWidget::contextMenuTextBrowser(QPoint point)
|
|||
contextMnu->addAction(ui->actionClearChatHistory);
|
||||
contextMnu->addAction(ui->actionQuote);
|
||||
|
||||
ui->actionSave_image->setData(point);
|
||||
contextMnu->addAction(ui->actionSave_image);
|
||||
QTextCursor cursor = ui->textBrowser->cursorForPosition(point);
|
||||
if(ImageUtil::checkImage(cursor))
|
||||
{
|
||||
ui->actionSave_image->setData(point);
|
||||
contextMnu->addAction(ui->actionSave_image);
|
||||
}
|
||||
|
||||
contextMnu->exec(ui->textBrowser->viewport()->mapToGlobal(point));
|
||||
delete(contextMnu);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue