From a67883ca64db8a7b73ba0296e91b168fdae13c36 Mon Sep 17 00:00:00 2001 From: Max-Wilhelm Bruker Date: Wed, 10 Nov 2010 16:08:32 +0100 Subject: [PATCH] stack arrow bug fix; minor spanish translation fix --- cockatrice/src/stackzone.cpp | 10 ++++++++++ cockatrice/translations/cockatrice_es.ts | 16 ++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/cockatrice/src/stackzone.cpp b/cockatrice/src/stackzone.cpp index 212b25f6..b164db1f 100644 --- a/cockatrice/src/stackzone.cpp +++ b/cockatrice/src/stackzone.cpp @@ -1,4 +1,6 @@ #include +#include +#include "arrowitem.h" #include "stackzone.h" #include "settingscache.h" #include "player.h" @@ -59,6 +61,8 @@ void StackZone::handleDropEvent(int cardId, CardZone *startZone, const QPoint &/ void StackZone::reorganizeCards() { if (!cards.isEmpty()) { + QList arrowsToUpdate; + const int cardCount = cards.size(); qreal totalWidth = boundingRect().width(); qreal totalHeight = boundingRect().height(); @@ -78,7 +82,13 @@ void StackZone::reorganizeCards() else c->setPos(x, ((qreal) i) * cardHeight + (totalHeight - cardCount * cardHeight) / 2); c->setRealZValue(i); + + arrowsToUpdate.append(c->getArrowsFrom()); + arrowsToUpdate.append(c->getArrowsTo()); } + QSetIterator arrowIterator(QSet::fromList(arrowsToUpdate)); + while (arrowIterator.hasNext()) + arrowIterator.next()->updatePath(); } update(); } diff --git a/cockatrice/translations/cockatrice_es.ts b/cockatrice/translations/cockatrice_es.ts index 43b31e53..fddd0e4d 100644 --- a/cockatrice/translations/cockatrice_es.ts +++ b/cockatrice/translations/cockatrice_es.ts @@ -1358,12 +1358,12 @@ from table - de la mesa + de la mesa from graveyard - del cementerio + del cementerio @@ -1373,7 +1373,7 @@ from hand - de la mano + de la mano @@ -1383,7 +1383,7 @@ from the bottom of his library - del fondo de la biblioteca + del fondo de la biblioteca @@ -1393,22 +1393,22 @@ from the top of his library - de la parte superior de la biblioteca + de la parte superior de la biblioteca from library - de la biblioteca + de la biblioteca from sideboard - de la reserva + de la reserva %1 puts %2 into play%3. - %1 pone %2 en juego %3. + %1 pone %2 en juego%3.