From e28837ba8e4c910c1969c9ed6fae971ce68d7f0d Mon Sep 17 00:00:00 2001 From: NATSUME Hiroaki Date: Fri, 10 May 2024 14:04:23 +0900 Subject: [PATCH] Fix codacy issue --- Tunny/Component/Input/TunnyValueList.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Tunny/Component/Input/TunnyValueList.cs b/Tunny/Component/Input/TunnyValueList.cs index 572a5803..02758ba2 100644 --- a/Tunny/Component/Input/TunnyValueList.cs +++ b/Tunny/Component/Input/TunnyValueList.cs @@ -8,7 +8,7 @@ namespace Tunny.Component.Util { public class TunnyValueList : GH_ValueList { - public TunnyValueList() : base() + public TunnyValueList() { Category = "Tunny"; SubCategory = "Input"; @@ -78,26 +78,26 @@ public TunnyValueListAttributes(GH_ValueList owner) : base(owner) protected override void Render(GH_Canvas canvas, Graphics graphics, GH_CanvasChannel channel) { - switch (channel) + if (channel == GH_CanvasChannel.Objects) { - case GH_CanvasChannel.Objects: - DrawObjects(canvas, graphics, channel); - break; - default: - base.Render(canvas, graphics, channel); - break; + DrawObjects(canvas, graphics, channel); + } + else + { + base.Render(canvas, graphics, channel); } } private void DrawObjects(GH_Canvas canvas, Graphics graphics, GH_CanvasChannel channel) { - var style = new GH_PaletteStyle(Color.CornflowerBlue, Color.DarkBlue, Color.Black); + var tunnyStyle = new GH_PaletteStyle(Color.CornflowerBlue, Color.DarkBlue, Color.Black); + GH_PaletteStyle normalStyle = GH_Skin.palette_normal_standard; GH_PaletteStyle warningStyle = GH_Skin.palette_warning_standard; GH_PaletteStyle hiddenStyle = GH_Skin.palette_hidden_standard; - GH_Skin.palette_normal_standard = style; - GH_Skin.palette_warning_standard = style; - GH_Skin.palette_hidden_standard = style; + GH_Skin.palette_normal_standard = tunnyStyle; + GH_Skin.palette_warning_standard = tunnyStyle; + GH_Skin.palette_hidden_standard = tunnyStyle; base.Render(canvas, graphics, channel); GH_Skin.palette_normal_standard = normalStyle; GH_Skin.palette_warning_standard = warningStyle;