Remove some unnecessary redrawing
This commit is contained in:
parent
d74affe0b9
commit
140b66862a
1 changed files with 3 additions and 3 deletions
|
@ -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<double>(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<double>(porymapConfig.getTilesetEditorTilesZoom() - 30) / 30.0);
|
||||
QTransform transform;
|
||||
|
|
Loading…
Reference in a new issue