mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 09:04:53 -07:00
stop card tap/untap animation in CardItem::resetState() to avoid unfinished animation during zone change
This commit is contained in:
parent
eb6520a737
commit
ca3a7e69a1
3 changed files with 11 additions and 1 deletions
|
|
@ -2,8 +2,8 @@
|
|||
#include <QPainter>
|
||||
#include <QMenu>
|
||||
#include <QAction>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include "gamescene.h"
|
||||
#include "carditem.h"
|
||||
#include "carddragitem.h"
|
||||
#include "carddatabase.h"
|
||||
|
|
@ -369,6 +369,8 @@ void CardItem::resetState()
|
|||
attachedCards.clear();
|
||||
setTapped(false, false);
|
||||
setDoesntUntap(false);
|
||||
if (scene())
|
||||
static_cast<GameScene *>(scene())->unregisterAnimationItem(this);
|
||||
update();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue