Fixes #6582: Change position of buttons when editing a location