mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 09:03:52 +00:00
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:
parent
16a34afbf6
commit
acb519a243
3 changed files with 16 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue