card selection fix

This commit is contained in:
Max-Wilhelm Bruker 2010-11-05 14:55:29 +01:00
parent ae70f5f17c
commit 7bff204461
2 changed files with 7 additions and 0 deletions

View file

@ -188,6 +188,12 @@ void AbstractCardItem::mousePressEvent(QGraphicsSceneMouseEvent *event)
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()
{
emit hovered(this);

View file

@ -48,6 +48,7 @@ protected:
QSizeF getTranslatedSize(QPainter *painter) const;
void transformPainter(QPainter *painter, const QSizeF &translatedSize);
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value);
};