xml saving, edit layer dialog, and grid dialog