Commit b106f762 authored by Max-Wilhelm Bruker's avatar Max-Wilhelm Bruker
Browse files

Merge branch 'devel' of git://github.com/mbruker/Cockatrice into devel

parents 0eee6d7a c043fe3c
......@@ -138,9 +138,11 @@ void PlayerTarget::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*o
AbstractCounter *PlayerTarget::addCounter(int _counterId, const QString &_name, int _value)
{
if (playerCounter)
return 0;
if (playerCounter) {
disconnect(playerCounter, 0, this, 0);
playerCounter->delCounter();
}
playerCounter = new PlayerCounter(owner, _counterId, _name, _value, this);
playerCounter->setPos(boundingRect().width() - playerCounter->boundingRect().width(), boundingRect().height() - playerCounter->boundingRect().height());
connect(playerCounter, SIGNAL(destroyed()), this, SLOT(counterDeleted()));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment