Fix timing of onMapResized

This commit is contained in:
GriffinR 2021-12-26 11:52:15 -05:00 committed by huderlem
parent 94b2c98308
commit 704b5894d1

View file

@ -312,13 +312,13 @@ void Map::setDimensions(int newWidth, int newHeight, bool setNewBlockdata) {
int oldWidth = layout->width.toInt();
int oldHeight = layout->height.toInt();
layout->width = QString::number(newWidth);
layout->height = QString::number(newHeight);
if (oldWidth != newWidth || oldHeight != newHeight) {
Scripting::cb_MapResized(oldWidth, oldHeight, newWidth, newHeight);
}
layout->width = QString::number(newWidth);
layout->height = QString::number(newHeight);
emit mapChanged(this);
emit mapDimensionsChanged(QSize(getWidth(), getHeight()));
}