mirror of
https://github.com/huderlem/porymap.git
synced 2026-09-26 18:06:32 -05:00
Rename DraggablePixmapItem::move() overload as moveTo to avoid confusion
This commit is contained in:
@@ -1553,7 +1553,7 @@ void MainWindow::addNewEvent(QString event_type)
|
||||
if (object) {
|
||||
auto halfSize = ui->graphicsView_Map->size() / 2;
|
||||
auto centerPos = ui->graphicsView_Map->mapToScene(halfSize.width(), halfSize.height());
|
||||
object->move(Metatile::coordFromPixmapCoord(centerPos));
|
||||
object->moveTo(Metatile::coordFromPixmapCoord(centerPos));
|
||||
updateObjects();
|
||||
editor->selectMapEvent(object, false);
|
||||
} else {
|
||||
|
||||
@@ -65,9 +65,16 @@ void DraggablePixmapItem::mousePressEvent(QGraphicsSceneMouseEvent *mouse) {
|
||||
this->editor->selectingEvent = true;
|
||||
}
|
||||
|
||||
void DraggablePixmapItem::move(int x, int y) {
|
||||
event->setX(event->x() + x);
|
||||
event->setY(event->y() + y);
|
||||
void DraggablePixmapItem::move(int dx, int dy) {
|
||||
event->setX(event->x() + dx);
|
||||
event->setY(event->y() + dy);
|
||||
updatePosition();
|
||||
emitPositionChanged();
|
||||
}
|
||||
|
||||
void DraggablePixmapItem::moveTo(const QPoint &pos) {
|
||||
event->setX(pos.x());
|
||||
event->setY(pos.y());
|
||||
updatePosition();
|
||||
emitPositionChanged();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user