From 5666738dbe0a0b6fb5e0e16de3cfec089504c93e Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Wed, 2 Nov 2022 23:02:33 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BD=D0=B0=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D1=8B=D0=B5=20=D1=84=D0=B8=D0=BD=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B?= =?UTF-8?q?=D0=B5=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Airbus/Airbus/FormPlaneConfig.cs | 4 ++++ 1 file changed, 4 insertions(+) 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(); } }