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:
@@ -89,7 +89,7 @@ CardView::~CardView()
|
||||
{
|
||||
if (card)
|
||||
{
|
||||
const Pos* r = card->view;
|
||||
const Pos* r = this;
|
||||
while (card)
|
||||
{
|
||||
if (r == card->view)
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user