Fix arg visibility toggling

This commit is contained in:
Kurt
2018-11-23 20:15:18 -08:00
parent 47349160b2
commit d89d2f8cd5
2 changed files with 2 additions and 3 deletions

View File

@@ -100,6 +100,7 @@ private void InitializeComponent()
this.CB_Arg.Name = "CB_Arg";
this.CB_Arg.Size = new System.Drawing.Size(82, 21);
this.CB_Arg.TabIndex = 69;
this.CB_Arg.Visible = false;
//
// CB_Species
//

View File

@@ -23,14 +23,12 @@ public EvolutionRow()
{
var index = (EvolutionType)CB_Method.SelectedIndex;
var type = index.GetArgType();
CB_Arg.Visible = type >= EvolutionTypeArgumentType.Items;
if (type == oldMethod)
return;
if (type < EvolutionTypeArgumentType.Items)
{
CB_Arg.Visible = false;
return;
}
CB_Arg.Visible = true;
oldMethod = type;