From 9bf206eff5706c8219ca5295fbe6322f06ed4b84 Mon Sep 17 00:00:00 2001 From: nezui1 <104579567+nezui1@users.noreply.github.com> Date: Mon, 6 May 2024 18:57:29 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9B=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0=E2=84=966?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjectAirFighter/ProjectAirFighter/FormWarPlaneConfig.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ProjectAirFighter/ProjectAirFighter/FormWarPlaneConfig.cs b/ProjectAirFighter/ProjectAirFighter/FormWarPlaneConfig.cs index 71fc646..ae3c00f 100644 --- a/ProjectAirFighter/ProjectAirFighter/FormWarPlaneConfig.cs +++ b/ProjectAirFighter/ProjectAirFighter/FormWarPlaneConfig.cs @@ -156,10 +156,12 @@ public partial class FormWarPlaneConfig : Form } private void labelAdditionalColor_DragEnter(object sender, DragEventArgs e) { - if (e.Data.GetDataPresent(typeof(Color))) + if (_warPlane?.EntityWarPlane is EntityAirFighter _airFighter) { + if (e.Data.GetDataPresent(typeof(Color))) e.Effect = DragDropEffects.Copy; else e.Effect = DragDropEffects.None; + } } private void buttonAdd_Click(object sender, EventArgs e)