Please sign in to comment.
Fixed crash when resizing map causes objects to get removed
This bug sneaked in due to a QUndoCommand getting immediately executed even when pushed as part of a macro, whereas the code was relying on it getting executed later (in using a modern for-loop that assumed the iterated container is not going to get modified). I expected execution to be later, since the beginMacro/endMacro are documented with a piece of "equivalent" code that would behave like that. Turns out it's not exactly the same, and I was a fool for assuming it was.
- Loading branch information...
Showing with 42 additions and 22 deletions.
- +4 −2 src/tiled/changeselectedarea.cpp
- +2 −1 src/tiled/changeselectedarea.h
- +9 −7 src/tiled/mapdocument.cpp
- +8 −4 src/tiled/movemapobject.cpp
- +4 −2 src/tiled/movemapobject.h
- +6 −2 src/tiled/resizemap.cpp
- +3 −1 src/tiled/resizemap.h
- +4 −2 src/tiled/resizetilelayer.cpp
- +2 −1 src/tiled/resizetilelayer.h