diff --git a/PCK-Studio/Forms/Additional-Popups/AddFilePrompt.cs b/PCK-Studio/Forms/Additional-Popups/AddFilePrompt.cs index 69960382..12f436fc 100644 --- a/PCK-Studio/Forms/Additional-Popups/AddFilePrompt.cs +++ b/PCK-Studio/Forms/Additional-Popups/AddFilePrompt.cs @@ -5,14 +5,24 @@ using OMI.Formats.Pck; namespace PckStudio.Popups { - public partial class AddFilePrompt : MetroForm + public partial class AddFilePrompt : MetroForm { - /// - /// Text entered only valid when == , - /// otherwise - /// - public string Filepath => DialogResult == DialogResult.OK ? InputTextBox.Text : string.Empty; - public PckAssetType Filetype => (PckAssetType)(FileTypeComboBox.SelectedIndex + (FileTypeComboBox.SelectedIndex >= 3 ? 1 : 0)); + /// + /// Text entered only valid when == , + /// otherwise + /// + public string Filepath => DialogResult == DialogResult.OK ? InputTextBox.Text : string.Empty; + public PckAssetType Filetype + { + get => (PckAssetType)(FileTypeComboBox.SelectedIndex + (FileTypeComboBox.SelectedIndex >= 3 ? 1 : 0)); + set + { + int index = (int)value; + + + FileTypeComboBox.SelectedIndex = index >= 3 ? index - 1 : index; + } + } public AddFilePrompt(string initialText) : this(initialText, -1) { }