card selection fix
This commit is contained in:
parent
ae70f5f17c
commit
7bff204461
2 changed files with 7 additions and 0 deletions
|
@ -188,6 +188,12 @@ void AbstractCardItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||||
event->accept();
|
event->accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AbstractCardItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
||||||
|
{
|
||||||
|
// This function ensures the parent function doesn't mess around with our selection.
|
||||||
|
event->accept();
|
||||||
|
}
|
||||||
|
|
||||||
void AbstractCardItem::processHoverEvent()
|
void AbstractCardItem::processHoverEvent()
|
||||||
{
|
{
|
||||||
emit hovered(this);
|
emit hovered(this);
|
||||||
|
|
|
@ -48,6 +48,7 @@ protected:
|
||||||
QSizeF getTranslatedSize(QPainter *painter) const;
|
QSizeF getTranslatedSize(QPainter *painter) const;
|
||||||
void transformPainter(QPainter *painter, const QSizeF &translatedSize);
|
void transformPainter(QPainter *painter, const QSizeF &translatedSize);
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||||
|
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||||
QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value);
|
QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue