Commit b89152a0 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix using correct flags

parent e9d973d9
......@@ -100,7 +100,7 @@ void kolfNumInput::setLabel(const QString &label, Qt::Alignment a)
if (label.isEmpty()) {
delete d->label;
d->label = 0;
d->labelAlignment = 0;
d->labelAlignment = {};
} else {
if (!d->label) {
d->label = new QLabel(this);
......
......@@ -683,7 +683,7 @@ Kolf::Sign::Sign(QGraphicsItem* parent, b2World* world)
setWall((Kolf::WallIndex) i, true);
//Z value 1 should be enough to keep text above overlay
m_textItem->setZValue(1);
m_textItem->setAcceptedMouseButtons(0);
m_textItem->setAcceptedMouseButtons(Qt::NoButton);
//TODO: activate QGraphicsItem::ItemClipsChildrenToShape flag after
//refactoring (only after it is clear that the text is the only child)
}
......
......@@ -189,7 +189,7 @@ Kolf::Overlay::Overlay(CanvasItem* citem, QGraphicsItem* qitem, bool hack_addQit
//overlays have to be shown explicitly
hide();
//overlays themselves do not have mouse interaction, and do not paint anything itself
setAcceptedMouseButtons(0);
setAcceptedMouseButtons(Qt::NoButton);
setFlag(QGraphicsItem::ItemHasNoContents);
//initialize activator area item
m_activatorItem->setZValue(1);
......
Markdown is supported
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