diff --git a/Airbus/Airbus/FormPlaneConfig.cs b/Airbus/Airbus/FormPlaneConfig.cs index 2180561..57ee7bc 100644 --- a/Airbus/Airbus/FormPlaneConfig.cs +++ b/Airbus/Airbus/FormPlaneConfig.cs @@ -114,12 +114,14 @@ namespace Airbus //принимаем основной цвет private void LabelBaseColor_DragDrop(object sender, DragEventArgs e) { + //проверка на пустоту объекта if (_plane != null) { if (e.Data.GetDataPresent(typeof(Color))) { _plane.Airbus.CorpusColor = (Color)e.Data.GetData(typeof(Color)); } + DrawPlane(); } } @@ -140,6 +142,7 @@ namespace Airbus //принимаем дополнительный цвет private void LabelAddColor_DragDrop(object sender, DragEventArgs e) { + //проверка на пустоту объекта и правильную сущноть if (_plane != null && _plane is DrawningSuperAirbus airbus) { if (e.Data.GetDataPresent(typeof(Color))) @@ -149,6 +152,7 @@ namespace Airbus entityAirbus.AddColor = (Color)e.Data.GetData(typeof(Color)); } } + DrawPlane(); } }