From 50ae90c1483927978c810e228ed79a364d07f04c Mon Sep 17 00:00:00 2001 From: Max-Wilhelm Bruker Date: Fri, 25 Sep 2009 22:05:59 +0200 Subject: [PATCH] small bugfix --- cockatrice/src/counter.cpp | 2 +- cockatrice/src/player.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cockatrice/src/counter.cpp b/cockatrice/src/counter.cpp index ea159f3c..16c965c2 100644 --- a/cockatrice/src/counter.cpp +++ b/cockatrice/src/counter.cpp @@ -73,7 +73,7 @@ void Counter::setValue(int _value) void Counter::mousePressEvent(QGraphicsSceneMouseEvent *event) { if (event->button() == Qt::LeftButton) { - player->client->incCounter(id, -1); + player->client->incCounter(id, 1); event->accept(); } else if (event->button() == Qt::RightButton) { menu->exec(event->screenPos()); diff --git a/cockatrice/src/player.cpp b/cockatrice/src/player.cpp index 8c1a6d64..d87340ef 100644 --- a/cockatrice/src/player.cpp +++ b/cockatrice/src/player.cpp @@ -188,7 +188,7 @@ Player::~Player() void Player::updateBoundingRect() { - bRect = QRectF(0, 0, CARD_WIDTH + 60 + hand->boundingRect().width() + table->boundingRect().width(), table->boundingRect().height()); + bRect = QRectF(0, 0, CARD_WIDTH + 5 + counterAreaWidth + hand->boundingRect().width() + table->boundingRect().width(), table->boundingRect().height()); emit sizeChanged(); } @@ -574,7 +574,7 @@ void Player::paint(QPainter *painter, const QStyleOptionGraphicsItem */*option*/ font.setPixelSize(20); // font.setWeight(QFont::Bold); - int totalWidth = CARD_WIDTH + 60; + int totalWidth = CARD_WIDTH + counterAreaWidth + 5; if (getActive()) { QFontMetrics fm(font);