From c0a46ae05472e807639fb77cc2c6f21dd5430556 Mon Sep 17 00:00:00 2001 From: garak Date: Thu, 27 Apr 2023 14:35:22 -0400 Subject: [PATCH] fix layout redraw when changing used tileset --- src/mainwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5844afaa..19bb0d9d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2628,9 +2628,9 @@ void MainWindow::on_comboBox_EmergeMap_currentTextChanged(const QString &mapName void MainWindow::on_comboBox_PrimaryTileset_currentTextChanged(const QString &tilesetLabel) { - if (editor->project->primaryTilesetLabels.contains(tilesetLabel) && editor->map) { + if (editor->project->primaryTilesetLabels.contains(tilesetLabel) && editor->layout) { editor->updatePrimaryTileset(tilesetLabel); - redrawMapScene(); + redrawLayoutScene(); on_horizontalSlider_MetatileZoom_valueChanged(ui->horizontalSlider_MetatileZoom->value()); updateTilesetEditor(); prefab.updatePrefabUi(editor->layout); @@ -2640,9 +2640,9 @@ void MainWindow::on_comboBox_PrimaryTileset_currentTextChanged(const QString &ti void MainWindow::on_comboBox_SecondaryTileset_currentTextChanged(const QString &tilesetLabel) { - if (editor->project->secondaryTilesetLabels.contains(tilesetLabel) && editor->map) { + if (editor->project->secondaryTilesetLabels.contains(tilesetLabel) && editor->layout) { editor->updateSecondaryTileset(tilesetLabel); - redrawMapScene(); + redrawLayoutScene(); on_horizontalSlider_MetatileZoom_valueChanged(ui->horizontalSlider_MetatileZoom->value()); updateTilesetEditor(); prefab.updatePrefabUi(editor->layout);