GlobalSettings: Implement undo function for the "cancel" button