[DF-745] Add SafeRelease to LandscapeEditor's undo items
[DF-746] Repeating code moved to separate functions