mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-07 01:23:52 +00:00
fix(editor): exportZone preserves user displayName + dedupes tile list
Two related zone-manifest bugs: 1. displayName was always overwritten with the .adt prefix on every export, throwing away whatever the user typed in the Zone Metadata panel. 2. tiles vector was push_back'd to without clearing, so re-exporting the same zone would accumulate duplicate tile entries. Both fixed by checking displayName.empty() before assignment and calling tiles.clear() before the rebuild loop.
This commit is contained in:
parent
28c63cb6d9
commit
f9187ef58a
1 changed files with 4 additions and 1 deletions
|
|
@ -1291,7 +1291,10 @@ void EditorApp::exportZone(const std::string& outputDir) {
|
|||
// Scan output directory for all exported tiles (includes adjacent tiles)
|
||||
ZoneManifest& manifest = zoneManifest_;
|
||||
manifest.mapName = loadedMap_;
|
||||
manifest.displayName = loadedMap_;
|
||||
// Preserve user-set displayName from the Zone Metadata panel; only fill in
|
||||
// the default when the user hasn't customized it.
|
||||
if (manifest.displayName.empty()) manifest.displayName = loadedMap_;
|
||||
manifest.tiles.clear();
|
||||
manifest.tiles.push_back({loadedTileX_, loadedTileY_});
|
||||
namespace fs = std::filesystem;
|
||||
if (fs::exists(base)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue