mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-26 14:07:06 +00:00
MainForm - Fix model selector ignoring cancel button
This commit is contained in:
@@ -560,11 +560,12 @@ namespace PckStudio
|
||||
using ItemSelectionPopUp itemSelectionPopUp = new ItemSelectionPopUp(modelNames.ToArray());
|
||||
itemSelectionPopUp.ButtonText = "View";
|
||||
itemSelectionPopUp.LabelText = "Models:";
|
||||
if (itemSelectionPopUp.ShowDialog() == DialogResult.OK && modelNames.IndexInRange(itemSelectionPopUp.SelectedIndex))
|
||||
if (itemSelectionPopUp.ShowDialog() != DialogResult.OK || !modelNames.IndexInRange(itemSelectionPopUp.SelectedIndex))
|
||||
{
|
||||
return;
|
||||
}
|
||||
modelName = modelNames[itemSelectionPopUp.SelectedIndex];
|
||||
}
|
||||
}
|
||||
|
||||
NamedTexture modelTexture = new NamedTexture(Path.GetFileName(texturePath), asset.GetTexture());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user