Merge pull request 'B2026-054 - When performing a Transition search, the Formats dropdown list is repeating several times.' (#785) from B2026-054 into Development

good for testing phase
This commit was merged in pull request #785.
This commit is contained in:
2026-07-01 08:19:38 -04:00
+12 -14
View File
@@ -468,15 +468,18 @@ namespace Volian.Controls.Library
this.Refresh();
myFormatVersionList = FormatVersionList.GetFormatVersions();
cbxTranVersion.DisplayMember = "Title";
int lastLastFormatID = 0;
foreach (FormatVersion fv in myFormatVersionList)
{
if (fv.FormatID != lastLastFormatID)
List<FormatVersion> fvlst = myFormatVersionList.GroupBy(x => x.FormatID).Select(group => new
FormatVersion(title: group.Max(x => x.Title),
formatID: group.Key,
versionID: group.Max(x => x.VersionID)
)).OrderBy(y => y.Title).ToList();
foreach (FormatVersion fv in fvlst)
{
cbxTranVersion.Items.Add(fv);
lastLastFormatID = fv.FormatID;
}
}
cbxTranVersion.SelectedIndexChanged -= new EventHandler(cbxTranVersion_SelectedIndexChanged);
cbxTranVersion.SelectedIndexChanged += new EventHandler(cbxTranVersion_SelectedIndexChanged);
cbxTranFormat.SelectedIndexChanged -= new EventHandler(cbxTranFormat_SelectedIndexChanged);
@@ -556,14 +559,9 @@ namespace Volian.Controls.Library
string versionList = string.Empty;
string sep = string.Empty;
FormatVersion sfv = cbxTranVersion.SelectedItem as FormatVersion;
foreach (FormatVersion fv in myFormatVersionList)
{
if (fv.FormatID == sfv.FormatID)
{
versionList += sep + fv.VersionID;
sep = ",";
}
}
versionList = string.Join(",", myFormatVersionList.Where(x => x.FormatID == sfv?.FormatID).Select(y => y.VersionID));
cbxTranVersion.Tag = versionList;
cbxTranFormatFillIn(versionList);
if (dicExpandedFolderNodes.Count > 0)