Skip to content

Commit 954a496

Browse files
committed
fix: Select() is used for text selection not combobox item selection, switch back to SelectedIndex and add a case for missing rarity
1 parent 085b432 commit 954a496

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Intersect.Editor/Forms/Editors/frmItem.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,14 @@ private void UpdateEditor()
344344
nudRgbaA.Value = mEditorItem.Color.A;
345345
cmbEquipmentAnimation.SelectedIndex = AnimationBase.ListIndex(mEditorItem.EquipmentAnimationId) + 1;
346346
nudPrice.Value = mEditorItem.Price;
347-
cmbRarity.Select(mEditorItem.Rarity, 1);
347+
if (mEditorItem.Rarity < cmbRarity.Items.Count)
348+
{
349+
cmbRarity.SelectedIndex = mEditorItem.Rarity;
350+
}
351+
else if (cmbRarity.Items.Count > 0)
352+
{
353+
cmbRarity.SelectedIndex = 0;
354+
}
348355

349356
nudStr.Value = mEditorItem.StatsGiven[0];
350357
nudMag.Value = mEditorItem.StatsGiven[1];

0 commit comments

Comments
 (0)