Merge branch 'devel' of git://github.com/mbruker/Cockatrice into devel
This commit is contained in:
commit
b106f76294
1 changed files with 5 additions and 3 deletions
|
@ -138,9 +138,11 @@ void PlayerTarget::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*o
|
||||||
|
|
||||||
AbstractCounter *PlayerTarget::addCounter(int _counterId, const QString &_name, int _value)
|
AbstractCounter *PlayerTarget::addCounter(int _counterId, const QString &_name, int _value)
|
||||||
{
|
{
|
||||||
if (playerCounter)
|
if (playerCounter) {
|
||||||
return 0;
|
disconnect(playerCounter, 0, this, 0);
|
||||||
|
playerCounter->delCounter();
|
||||||
|
}
|
||||||
|
|
||||||
playerCounter = new PlayerCounter(owner, _counterId, _name, _value, this);
|
playerCounter = new PlayerCounter(owner, _counterId, _name, _value, this);
|
||||||
playerCounter->setPos(boundingRect().width() - playerCounter->boundingRect().width(), boundingRect().height() - playerCounter->boundingRect().height());
|
playerCounter->setPos(boundingRect().width() - playerCounter->boundingRect().width(), boundingRect().height() - playerCounter->boundingRect().height());
|
||||||
connect(playerCounter, SIGNAL(destroyed()), this, SLOT(counterDeleted()));
|
connect(playerCounter, SIGNAL(destroyed()), this, SLOT(counterDeleted()));
|
||||||
|
|
Loading…
Reference in a new issue