mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-22 08:36:06 -05:00
Scriptapi: fix segfault in shift(), add missing flag to the caller of shift()
This commit is contained in:
@@ -149,7 +149,7 @@ void MainWindow::magicFillFromSelection(int x, int y, bool forceRedraw, bool com
|
||||
void MainWindow::shift(int xDelta, int yDelta, bool forceRedraw, bool commitChanges) {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return;
|
||||
this->editor->map_item->shift(xDelta, yDelta);
|
||||
this->editor->map_item->shift(xDelta, yDelta, true);
|
||||
this->tryCommitMapChanges(commitChanges);
|
||||
this->tryRedrawMapArea(forceRedraw);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ void MapPixmapItem::shift(QGraphicsSceneMouseEvent *event) {
|
||||
}
|
||||
|
||||
void MapPixmapItem::shift(int xDelta, int yDelta, bool fromScriptCall) {
|
||||
Blockdata oldMetatiles = !fromScriptCall ? map->layout->blockdata : Blockdata();
|
||||
Blockdata oldMetatiles = map->layout->blockdata;
|
||||
|
||||
for (int i = 0; i < map->getWidth(); i++)
|
||||
for (int j = 0; j < map->getHeight(); j++) {
|
||||
|
||||
Reference in New Issue
Block a user