Skip to content

Commit

Permalink
fix layout redraw when changing used tileset
Browse files Browse the repository at this point in the history
  • Loading branch information
garakmon committed Sep 27, 2023
1 parent 31ba88e commit 06ebd7c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 06ebd7c

Please sign in to comment.