Prevent ruler activation when right-clicking event in paint mode

This commit is contained in:
BigBahss 2020-10-02 22:31:44 -04:00
parent e50d562efe
commit 273dbaa94f

View file

@ -63,6 +63,7 @@ void DraggablePixmapItem::mousePressEvent(QGraphicsSceneMouseEvent *mouse) {
last_y = pos.y();
this->editor->selectMapEvent(this, mouse->modifiers() & Qt::ControlModifier);
this->editor->selectingEvent = true;
if (this->editor->obj_edit_mode == "select") {
if (!this->editor->map_ruler->isAnchored() && this->editor->map_ruler->isMousePressed(mouse)) {
this->editor->map_ruler->setAnchor(mouse->scenePos(), mouse->screenPos());
} else if (this->editor->map_ruler->isAnchored()) {
@ -72,6 +73,7 @@ void DraggablePixmapItem::mousePressEvent(QGraphicsSceneMouseEvent *mouse) {
this->editor->map_ruler->endAnchor();
}
}
}
void DraggablePixmapItem::move(int x, int y) {
event->setX(event->x() + x);