Fixed http://code.google.com/p/wagic/issues/detail?id=572, where a card sometimes might not show its tap status correctly. My fix for 550 was slightly off, in that if a card view's position was updated (ie from a zone change, etc), the pos pointer shouldn't be cleared. Only the pos related to the 'this' pointer is the one that can't be referenced anymore, fixed the destructor code.

This commit is contained in:
wrenczes@gmail.com
2011-01-25 07:52:01 +00:00
parent 6100641edd
commit d439be4f75
2 changed files with 6 additions and 1 deletions

View File

@@ -89,7 +89,7 @@ CardView::~CardView()
{
if (card)
{
const Pos* r = card->view;
const Pos* r = this;
while (card)
{
if (r == card->view)

View File

@@ -370,6 +370,11 @@ int GuiPlay::receiveEventPlus(WEvent * e)
{
event->card->view->actT = event->after ? M_PI / 2 : 0;
}
else
{
// this should never happen, if you have a consistent repro case, ping Wil please
assert(false);
}
return 1;
}
else if (WEventPhaseChange *event = dynamic_cast<WEventPhaseChange*>(e))