Fix onMapResized not triggering

This commit is contained in:
GriffinR 2022-12-15 02:13:30 -05:00
parent 066110f3a1
commit 324bc3a517
2 changed files with 3 additions and 2 deletions

View file

@ -15,6 +15,7 @@ The **"Breaking Changes"** listed below are changes that have been made in the d
### Fixed
- Fix New Map settings being preserved when switching projects.
- Fix scripting API callback `onMapResized` not triggering.
## [5.0.0] - 2022-10-30
### Breaking Changes

View file

@ -2631,8 +2631,8 @@ void MainWindow::on_pushButton_ChangeDimensions_clicked()
QSize newMapDimensions(widthSpinBox->value(), heightSpinBox->value());
QSize newBorderDimensions(bwidthSpinBox->value(), bheightSpinBox->value());
if (oldMapDimensions != newMapDimensions || oldBorderDimensions != newBorderDimensions) {
editor->map->setDimensions(newMapDimensions.width(), newMapDimensions.height(), true);
editor->map->setBorderDimensions(newBorderDimensions.width(), newBorderDimensions.height(), true);
editor->map->setDimensions(newMapDimensions.width(), newMapDimensions.height(), true, true);
editor->map->setBorderDimensions(newBorderDimensions.width(), newBorderDimensions.height(), true, true);
editor->map->editHistory.push(new ResizeMap(map,
oldMapDimensions, newMapDimensions,
oldMetatiles, map->layout->blockdata,