Prevent ruler activation when right-clicking event in paint mode
This commit is contained in:
parent
e50d562efe
commit
273dbaa94f
1 changed files with 9 additions and 7 deletions
|
@ -63,6 +63,7 @@ void DraggablePixmapItem::mousePressEvent(QGraphicsSceneMouseEvent *mouse) {
|
||||||
last_y = pos.y();
|
last_y = pos.y();
|
||||||
this->editor->selectMapEvent(this, mouse->modifiers() & Qt::ControlModifier);
|
this->editor->selectMapEvent(this, mouse->modifiers() & Qt::ControlModifier);
|
||||||
this->editor->selectingEvent = true;
|
this->editor->selectingEvent = true;
|
||||||
|
if (this->editor->obj_edit_mode == "select") {
|
||||||
if (!this->editor->map_ruler->isAnchored() && this->editor->map_ruler->isMousePressed(mouse)) {
|
if (!this->editor->map_ruler->isAnchored() && this->editor->map_ruler->isMousePressed(mouse)) {
|
||||||
this->editor->map_ruler->setAnchor(mouse->scenePos(), mouse->screenPos());
|
this->editor->map_ruler->setAnchor(mouse->scenePos(), mouse->screenPos());
|
||||||
} else if (this->editor->map_ruler->isAnchored()) {
|
} else if (this->editor->map_ruler->isAnchored()) {
|
||||||
|
@ -71,6 +72,7 @@ void DraggablePixmapItem::mousePressEvent(QGraphicsSceneMouseEvent *mouse) {
|
||||||
if (this->editor->map_ruler->isMousePressed(mouse))
|
if (this->editor->map_ruler->isMousePressed(mouse))
|
||||||
this->editor->map_ruler->endAnchor();
|
this->editor->map_ruler->endAnchor();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DraggablePixmapItem::move(int x, int y) {
|
void DraggablePixmapItem::move(int x, int y) {
|
||||||
|
|
Loading…
Reference in a new issue