B2026-054 - When performing a Transition search, the Formats dropdown list is repeating several times.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user