From 016c65448eec088873a7d66cb5a9278cc980f691 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Wed, 1 Jul 2020 17:18:27 -0400 Subject: [PATCH] Track unsaved changes to metatile attributes and labels --- src/ui/tileseteditor.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ui/tileseteditor.cpp b/src/ui/tileseteditor.cpp index dda92d3e..d0f6b5d1 100644 --- a/src/ui/tileseteditor.cpp +++ b/src/ui/tileseteditor.cpp @@ -380,6 +380,7 @@ void TilesetEditor::on_comboBox_metatileBehaviors_activated(const QString &metat this->metatile->behavior = static_cast(project->metatileBehaviorMap[metatileBehavior]); MetatileHistoryItem *commit = new MetatileHistoryItem(metatileSelector->getSelectedMetatile(), prevMetatile, this->metatile->copy()); metatileHistory.push(commit); + this->hasUnsavedChanges = true; } } @@ -396,6 +397,7 @@ void TilesetEditor::saveMetatileLabel() this->metatile->label = this->ui->lineEdit_metatileLabel->text(); MetatileHistoryItem *commit = new MetatileHistoryItem(metatileSelector->getSelectedMetatile(), prevMetatile, this->metatile->copy()); metatileHistory.push(commit); + this->hasUnsavedChanges = true; } } @@ -406,6 +408,7 @@ void TilesetEditor::on_comboBox_layerType_activated(int layerType) this->metatile->layerType = static_cast(layerType); MetatileHistoryItem *commit = new MetatileHistoryItem(metatileSelector->getSelectedMetatile(), prevMetatile, this->metatile->copy()); metatileHistory.push(commit); + this->hasUnsavedChanges = true; } } @@ -416,6 +419,7 @@ void TilesetEditor::on_comboBox_encounterType_activated(int encounterType) this->metatile->encounterType = static_cast(encounterType); MetatileHistoryItem *commit = new MetatileHistoryItem(metatileSelector->getSelectedMetatile(), prevMetatile, this->metatile->copy()); metatileHistory.push(commit); + this->hasUnsavedChanges = true; } } @@ -426,6 +430,7 @@ void TilesetEditor::on_comboBox_terrainType_activated(int terrainType) this->metatile->terrainType = static_cast(terrainType); MetatileHistoryItem *commit = new MetatileHistoryItem(metatileSelector->getSelectedMetatile(), prevMetatile, this->metatile->copy()); metatileHistory.push(commit); + this->hasUnsavedChanges = true; } }