diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-02-09 11:51:07 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-02-09 11:51:07 +0300 |
commit | eaa6a0cdb3b0bd5dd06ffac428ce8194aa2507f7 (patch) | |
tree | 54498eea66e6568da8182399dda92ea368d623a5 /NesMenuCollection.cs | |
parent | 37b59cfa2641ba327f7664f53589f27489f77c46 (diff) |
Fixes
Diffstat (limited to 'NesMenuCollection.cs')
-rw-r--r-- | NesMenuCollection.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/NesMenuCollection.cs b/NesMenuCollection.cs index f2238eca..70cde994 100644 --- a/NesMenuCollection.cs +++ b/NesMenuCollection.cs @@ -113,6 +113,9 @@ namespace com.clusterrr.hakchi_gui else if (style == SplitStyle.PagesEqual)
// Pages, equal
{
+ root.Clear();
+ root.AddRange(collections[0]);
+ collections[0] = root;
for (i = 0; i < collections.Count; i++)
{
for (int j = i - 1; j >= 0; j--)
@@ -121,7 +124,7 @@ namespace com.clusterrr.hakchi_gui var lname = alphaNum.Replace(collections[j].Where(o => (o is NesGame) || (o is NesDefaultGame)).Last().Name.ToUpper(), "");
var folder = new NesMenuFolder()
{
- ChildMenuCollection = j > 0 ? collections[j] : root,
+ ChildMenuCollection = collections[j],
NameParts = new string[] { fname, lname },
Position = NesMenuFolder.Priority.Left
};
@@ -133,7 +136,7 @@ namespace com.clusterrr.hakchi_gui var lname = alphaNum.Replace(collections[j].Where(o => (o is NesGame) || (o is NesDefaultGame)).Last().Name.ToUpper(), "");
var folder = new NesMenuFolder()
{
- ChildMenuCollection = j > 0 ? collections[j] : root,
+ ChildMenuCollection = collections[j],
NameParts = new string[] { fname, lname },
Position = NesMenuFolder.Priority.Right
};
@@ -141,8 +144,6 @@ namespace com.clusterrr.hakchi_gui }
TrimFolderNames(collections[i]);
}
- root.Clear();
- root.AddRange(collections[0]);
}
else if (style == SplitStyle.FoldersAlphabetic_PagesEqual || style == SplitStyle.FoldersAlphabetic_FoldersEqual)
{
|