diff --git a/src/ui/resizelayoutpopup.cpp b/src/ui/resizelayoutpopup.cpp index 679e9ee2..afbf63fb 100644 --- a/src/ui/resizelayoutpopup.cpp +++ b/src/ui/resizelayoutpopup.cpp @@ -133,10 +133,11 @@ void ResizeLayoutPopup::setupLayoutView() { this->scene->setValidRect(rect); this->outline->setRect(rect); + // Rect may have changed, ensure spinners reflect final rect size. const QSignalBlocker b_Width(this->ui->spinBox_width); const QSignalBlocker b_Height(this->ui->spinBox_height); - this->ui->spinBox_width->setValue(metatilesWide); - this->ui->spinBox_height->setValue(metatilesTall); + this->ui->spinBox_width->setValue(rect.width() / Metatile::pixelWidth()); + this->ui->spinBox_height->setValue(rect.height() / Metatile::pixelHeight()); }); scene->addItem(outline);