Fixed sensitivity of the action in the context menu to copy a link from the chat text when scrollbars are visible.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5608 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-09-26 17:52:58 +00:00
parent 9f1b19bd98
commit b40a716e87
2 changed files with 10 additions and 4 deletions

View File

@ -279,12 +279,15 @@ void FriendsDialog::pasteLink()
void FriendsDialog::contextMenuMsgText(QPoint point)
{
QMenu *contextMnu = ui.msgText->createStandardContextMenu(point);
QMatrix matrix;
matrix.translate(ui.msgText->horizontalScrollBar()->value(), ui.msgText->verticalScrollBar()->value());
QMenu *contextMnu = ui.msgText->createStandardContextMenu(matrix.map(point));
contextMnu->addSeparator();
contextMnu->addAction(ui.actionClear_Chat_History);
contextMnu->exec(QCursor::pos());
contextMnu->exec(ui.msgText->viewport()->mapToGlobal(point));
delete(contextMnu);
}

View File

@ -415,12 +415,15 @@ void ChatWidget::contextMenu(QPoint point)
void ChatWidget::contextMenuTextBrowser(QPoint point)
{
QMenu *contextMnu = ui->textBrowser->createStandardContextMenu(point);
QMatrix matrix;
matrix.translate(ui->textBrowser->horizontalScrollBar()->value(), ui->textBrowser->verticalScrollBar()->value());
QMenu *contextMnu = ui->textBrowser->createStandardContextMenu(matrix.map(point));
contextMnu->addSeparator();
contextMnu->addAction(ui->actionClearChatHistory);
contextMnu->exec(QCursor::pos());
contextMnu->exec(ui->textBrowser->viewport()->mapToGlobal(point));
delete(contextMnu);
}