Added warning to save when leaving layout tab