diff --git a/src/ui/tileseteditor.cpp b/src/ui/tileseteditor.cpp index 2b097083..75590927 100644 --- a/src/ui/tileseteditor.cpp +++ b/src/ui/tileseteditor.cpp @@ -333,9 +333,11 @@ void TilesetEditor::refresh() { } } + this->ui->graphicsView_Tiles->setSceneRect(0, 0, this->tileSelector->pixmap().width(), this->tileSelector->pixmap().height()); + this->ui->graphicsView_Metatiles->setSceneRect(0, 0, this->metatileSelector->pixmap().width(), this->metatileSelector->pixmap().height()); + this->ui->graphicsView_selectedTile->setFixedSize(this->selectedTilePixmapItem->pixmap().width() + 2, this->selectedTilePixmapItem->pixmap().height() + 2); this->redrawTileSelector(); this->redrawMetatileSelector(); - this->ui->graphicsView_selectedTile->setFixedSize(this->selectedTilePixmapItem->pixmap().width() + 2, this->selectedTilePixmapItem->pixmap().height() + 2); } void TilesetEditor::drawSelectedTiles() { @@ -1191,7 +1193,6 @@ void TilesetEditor::on_horizontalSlider_MetatilesZoom_valueChanged(int value) { void TilesetEditor::redrawMetatileSelector() { QSize size(this->metatileSelector->pixmap().width(), this->metatileSelector->pixmap().height()); - this->ui->graphicsView_Metatiles->setSceneRect(0, 0, size.width() + 2, size.height() + 2); double scale = pow(3.0, static_cast(porymapConfig.getTilesetEditorMetatilesZoom() - 30) / 30.0); QTransform transform; @@ -1213,7 +1214,6 @@ void TilesetEditor::on_horizontalSlider_TilesZoom_valueChanged(int value) { void TilesetEditor::redrawTileSelector() { QSize size(this->tileSelector->pixmap().width(), this->tileSelector->pixmap().height()); - this->ui->graphicsView_Tiles->setSceneRect(0, 0, size.width() + 2, size.height() + 2); double scale = pow(3.0, static_cast(porymapConfig.getTilesetEditorTilesZoom() - 30) / 30.0); QTransform transform;