mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
cardInfoPopup fix; chatView fix
This commit is contained in:
parent
9f098f2a6d
commit
0120d2a019
13 changed files with 38 additions and 25 deletions
|
|
@ -26,6 +26,7 @@ AbstractCardItem::AbstractCardItem(const QString &_name, Player *_owner, QGraphi
|
|||
AbstractCardItem::~AbstractCardItem()
|
||||
{
|
||||
qDebug() << "AbstractCardItem destructor:" << name;
|
||||
emit deleteCardInfoPopup(name);
|
||||
}
|
||||
|
||||
QRectF AbstractCardItem::boundingRect() const
|
||||
|
|
@ -157,6 +158,10 @@ void AbstractCardItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *
|
|||
|
||||
void AbstractCardItem::setName(const QString &_name)
|
||||
{
|
||||
if (name == _name)
|
||||
return;
|
||||
|
||||
emit deleteCardInfoPopup(name);
|
||||
disconnect(info, 0, this, 0);
|
||||
name = _name;
|
||||
info = db->getCard(name);
|
||||
|
|
@ -213,7 +218,7 @@ void AbstractCardItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
|||
void AbstractCardItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
if (event->button() == Qt::MidButton)
|
||||
emit deleteCardInfoPopup();
|
||||
emit deleteCardInfoPopup(name);
|
||||
|
||||
// This function ensures the parent function doesn't mess around with our selection.
|
||||
event->accept();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue