Update AI Model ComboBox after fetching models.txt

This commit is contained in:
N00MKRAD
2021-02-28 11:56:09 +01:00
parent 0076e08166
commit 72cb1e93dc
2 changed files with 9 additions and 1 deletions

View File

@@ -318,12 +318,19 @@ namespace Flowframes
{
if (string.IsNullOrWhiteSpace(aiCombox.Text) || aiCombox.Text == lastAiComboxStr) return;
lastAiComboxStr = aiCombox.Text;
aiModel = UIUtils.FillAiModelsCombox(aiModel, GetAi());
UpdateAiModelCombox();
if(initialized)
ConfigParser.SaveComboxIndex(aiCombox);
interpFactorCombox_SelectedIndexChanged(null, null);
}
public void UpdateAiModelCombox ()
{
aiModel = UIUtils.FillAiModelsCombox(aiModel, GetAi());
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
Logger.Log("Closing main form.", true);

View File

@@ -142,6 +142,7 @@ namespace Flowframes.OS
string savePath = Path.Combine(Paths.GetPkgPath(), aiName, "models.txt");
if(File.Exists(savePath)) File.Delete(savePath);
client.DownloadFile(url, savePath);
Program.mainForm.UpdateAiModelCombox();
});
}
catch (Exception e)