contect menu fix (#2719)

This commit is contained in:
backendr 2017-05-18 23:03:21 +02:00 committed by Zach H
parent b53cd33eed
commit 62681f7f8d
2 changed files with 8 additions and 2 deletions

View file

@ -1,7 +1,6 @@
#include <QApplication>
#include <QPainter>
#include <QMenu>
#include <QAction>
#include <QGraphicsSceneMouseEvent>
#include "gamescene.h"
#include "carditem.h"

View file

@ -2079,7 +2079,7 @@ void Player::cardMenuAction()
}
case cmClone: {
Command_CreateToken *cmd = new Command_CreateToken;
cmd->set_zone(card->getZone()->getName().toStdString());
cmd->set_zone("table");
cmd->set_card_name(card->getName().toStdString());
cmd->set_color(card->getColor().toStdString());
cmd->set_pt(card->getPT().toStdString());
@ -2519,6 +2519,13 @@ void Player::updateCardMenu(const CardItem *card)
}
} else
cardMenu->addMenu(moveMenu);
} else {
if (card->getZone()
&& card->getZone()->getName() != "hand") {
cardMenu->addAction(aDrawArrow);
cardMenu->addSeparator();
cardMenu->addAction(aClone);
}
}
}