fix(editor): object ID reset on load, zone name validation

- ObjectPlacer::loadFromFile() now resets uniqueIdCounter_ and clears
  selectedIndices_ to prevent ID collisions on repeated loads
- Zone rename validates against path traversal and special characters
  (rejects slashes, dots, colons, control chars, empty strings)
- UI shows error toast for invalid zone names
This commit is contained in:
Kelsi 2026-05-05 14:15:28 -07:00
parent 16a34afbf6
commit acb519a243
3 changed files with 16 additions and 3 deletions

View file

@ -244,6 +244,8 @@ bool ObjectPlacer::loadFromFile(const std::string& path) {
objects_.clear();
undoStack_.clear();
selectedIdx_ = -1;
selectedIndices_.clear();
uniqueIdCounter_ = 1;
for (const auto& jo : arr) {
PlacedObject obj;