Sending card name to chat on shift+click (#3106)

This commit is contained in:
Vafthrudnir 2018-02-13 08:50:37 +01:00 committed by Zach H
parent 8084ab605f
commit 11ad677fe8
5 changed files with 16 additions and 3 deletions

View file

@ -368,7 +368,8 @@ void CardItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
owner->updateCardMenu(this);
cardMenu->exec(event->screenPos());
}
} else if ((event->button() == Qt::LeftButton) && !settingsCache->getDoubleClickToPlay()) {
} else if ((event->modifiers() != Qt::AltModifier) && (event->button() == Qt::LeftButton) &&
(!settingsCache->getDoubleClickToPlay())) {
bool hideCard = false;
if (zone && zone->getIsView()) {
ZoneViewZone *view = static_cast<ZoneViewZone *>(zone);
@ -388,7 +389,8 @@ void CardItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
void CardItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
{
if (settingsCache->getDoubleClickToPlay() && event->buttons() == Qt::LeftButton) {
if ((event->modifiers() != Qt::AltModifier) && (settingsCache->getDoubleClickToPlay()) &&
(event->buttons() == Qt::LeftButton)) {
if (revealedCard)
zone->removeCard(this);
else