X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatitem.cpp;h=098c78eb3c2c55abe921750cb7b7a6b5d95dd800;hp=fc45b77c0e6eafad02955fb05722555ba789acad;hb=e32fd68ac69cada52a65598d4781f1cc735145fc;hpb=86d792a90e2868635170a1092ac7a9278a84ef71 diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index fc45b77c..098c78eb 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -278,7 +278,7 @@ void ChatItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { } void ChatItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { - if(_selectionMode != NoSelection && !event->buttons() & Qt::LeftButton) { + if(_selectionMode != NoSelection && event->button() == Qt::LeftButton) { chatScene()->selectionToClipboard(QClipboard::Selection); event->accept(); } else @@ -286,9 +286,9 @@ void ChatItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { } void ChatItem::addActionsToMenu(QMenu *menu, const QPointF &pos) { - Q_UNUSED(menu); Q_UNUSED(pos); + Client::mainUi()->actionProvider()->addActions(menu, chatScene()->filter(), data(MessageModel::BufferIdRole).value()); } // ************************************************************ @@ -602,8 +602,6 @@ void ContentsChatItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event) { } void ContentsChatItem::addActionsToMenu(QMenu *menu, const QPointF &pos) { - Q_UNUSED(pos); // we assume that the current mouse cursor pos is the point of invocation - if(privateData()->currentClickable.isValid()) { Clickable click = privateData()->currentClickable; switch(click.type) { @@ -624,9 +622,8 @@ void ContentsChatItem::addActionsToMenu(QMenu *menu, const QPointF &pos) { break; } } else { - // Buffer-specific actions - Client::mainUi()->actionProvider()->addActions(menu, chatScene()->filter(), data(MessageModel::BufferIdRole).value()); + ChatItem::addActionsToMenu(menu, pos); } }