B2026-054 - When performing a Transition search, the Formats dropdown list is repeating several times. #785
@@ -468,15 +468,18 @@ namespace Volian.Controls.Library
|
|||||||
this.Refresh();
|
this.Refresh();
|
||||||
myFormatVersionList = FormatVersionList.GetFormatVersions();
|
myFormatVersionList = FormatVersionList.GetFormatVersions();
|
||||||
cbxTranVersion.DisplayMember = "Title";
|
cbxTranVersion.DisplayMember = "Title";
|
||||||
int lastLastFormatID = 0;
|
|
||||||
foreach (FormatVersion fv in myFormatVersionList)
|
List<FormatVersion> fvlst = myFormatVersionList.GroupBy(x => x.FormatID).Select(group => new
|
||||||
{
|
FormatVersion(title: group.Max(x => x.Title),
|
||||||
if (fv.FormatID != lastLastFormatID)
|
formatID: group.Key,
|
||||||
|
versionID: group.Max(x => x.VersionID)
|
||||||
|
)).OrderBy(y => y.Title).ToList();
|
||||||
|
|
||||||
|
foreach (FormatVersion fv in fvlst)
|
||||||
{
|
{
|
||||||
cbxTranVersion.Items.Add(fv);
|
cbxTranVersion.Items.Add(fv);
|
||||||
lastLastFormatID = fv.FormatID;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cbxTranVersion.SelectedIndexChanged -= new EventHandler(cbxTranVersion_SelectedIndexChanged);
|
cbxTranVersion.SelectedIndexChanged -= new EventHandler(cbxTranVersion_SelectedIndexChanged);
|
||||||
cbxTranVersion.SelectedIndexChanged += new EventHandler(cbxTranVersion_SelectedIndexChanged);
|
cbxTranVersion.SelectedIndexChanged += new EventHandler(cbxTranVersion_SelectedIndexChanged);
|
||||||
cbxTranFormat.SelectedIndexChanged -= new EventHandler(cbxTranFormat_SelectedIndexChanged);
|
cbxTranFormat.SelectedIndexChanged -= new EventHandler(cbxTranFormat_SelectedIndexChanged);
|
||||||
@@ -556,14 +559,9 @@ namespace Volian.Controls.Library
|
|||||||
string versionList = string.Empty;
|
string versionList = string.Empty;
|
||||||
string sep = string.Empty;
|
string sep = string.Empty;
|
||||||
FormatVersion sfv = cbxTranVersion.SelectedItem as FormatVersion;
|
FormatVersion sfv = cbxTranVersion.SelectedItem as FormatVersion;
|
||||||
foreach (FormatVersion fv in myFormatVersionList)
|
|
||||||
{
|
versionList = string.Join(",", myFormatVersionList.Where(x => x.FormatID == sfv?.FormatID).Select(y => y.VersionID));
|
||||||
if (fv.FormatID == sfv.FormatID)
|
|
||||||
{
|
|
||||||
versionList += sep + fv.VersionID;
|
|
||||||
sep = ",";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cbxTranVersion.Tag = versionList;
|
cbxTranVersion.Tag = versionList;
|
||||||
cbxTranFormatFillIn(versionList);
|
cbxTranFormatFillIn(versionList);
|
||||||
if (dicExpandedFolderNodes.Count > 0)
|
if (dicExpandedFolderNodes.Count > 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user