Skip to content

Commit

Permalink
- fixed Quick Add to work with directory names that contain '.' periods
Browse files Browse the repository at this point in the history
- fixed representative arrangement bug
  • Loading branch information
cozy1 committed May 21, 2019
1 parent 7375af8 commit a6a668c
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion RocksmithTookitGUI/Properties/AssemblyInfo.cs
Expand Up @@ -29,5 +29,5 @@
// //
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT // THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")] [assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("8c0983e6")] [assembly: AssemblyInformationalVersion("7375af81")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
2 changes: 2 additions & 0 deletions RocksmithTookitGUI/ReleaseNotes.txt
@@ -1,5 +1,7 @@
Rocksmith Toolkit Release Notes Rocksmith Toolkit Release Notes


- fixed Quick Add to work with directory names that contain '.' periods
- fixed representative arrangement bug
- DDC tab menu reports errors correctly instead of throwing a misleading exception - DDC tab menu reports errors correctly instead of throwing a misleading exception
- Import Package will autosave xml template if General Config>Autosave Templates is enabled - Import Package will autosave xml template if General Config>Autosave Templates is enabled
(turn off autosave if you do not want to unknowingly overwrite existing xml templates) (turn off autosave if you do not want to unknowingly overwrite existing xml templates)
Expand Down
Expand Up @@ -137,9 +137,9 @@ public AttributesHeader2014(string arrangementFileName, Arrangement arrangement,
EasyMastery = Math.Round((double)(NotesEasy / NotesHard), 9); EasyMastery = Math.Round((double)(NotesEasy / NotesHard), 9);
MediumMastery = Math.Round((double)(NotesMedium / NotesHard), 9); MediumMastery = Math.Round((double)(NotesMedium / NotesHard), 9);
Metronome = arrangement.Metronome == Sng.Metronome.None ? null : (int?)arrangement.Metronome; Metronome = arrangement.Metronome == Sng.Metronome.None ? null : (int?)arrangement.Metronome;
// TODO: check for bug here // TODO: monitor this change
// if there is an equivalent bonus arrangement then Representative is set to "1" otherwise "0" // Representative = Convert.ToInt32(!arrangement.BonusArr);
Representative = Convert.ToInt32(!arrangement.BonusArr); Representative = arrangement.ArrangementPropeties.Represent;
RouteMask = (int)arrangement.RouteMask; RouteMask = (int)arrangement.RouteMask;


ManifestFunctions.GetSongDifficulty(this, song2014); ManifestFunctions.GetSongDifficulty(this, song2014);
Expand Down
15 changes: 12 additions & 3 deletions RocksmithToolkitLib/Extensions/TreeViewBrowser.cs
Expand Up @@ -180,9 +180,9 @@ public string InitTreeViewBrowser()
InitDefaultFolders(); InitDefaultFolders();
// de-activate EH's // de-activate EH's
ToggleEventHandlers(false); ToggleEventHandlers(false);

RestoreTreeView(new List<string>() { InitialDirectory }, "\\", out errMsg); RestoreTreeView(new List<string>() { InitialDirectory }, "\\", out errMsg);

// re- activate EH's // re- activate EH's
ToggleEventHandlers(true); // this trashes the InitialDirectory Restore ToggleEventHandlers(true); // this trashes the InitialDirectory Restore


Expand Down Expand Up @@ -294,7 +294,13 @@ private void AddNodes(TreeView treeView, TreeNode node)


foreach (var dir in directories) foreach (var dir in directories)
{ {
node.Nodes.Add(new TreeNode(Path.GetFileNameWithoutExtension(dir)) // GetFileNameWithoutExtension method does not work with directory names that contain '.' periods
// node.Nodes.Add(new TreeNode(Path.GetFileNameWithoutExtension(dir))
// alt method
// node.Nodes.Add(new TreeNode(Path.GetFileName(dir))
var ndx = dir.LastIndexOf(Path.DirectorySeparatorChar);
var dirName = dir.Substring(ndx + 1);
node.Nodes.Add(new TreeNode(dirName)
{ {
Tag = dir, Tag = dir,
ImageIndex = 0, ImageIndex = 0,
Expand Down Expand Up @@ -694,6 +700,9 @@ public void RestoreTreeView(List<string> paths, string separator, out string err


for (int i = 1; i < pathParts.Count(); i++) for (int i = 1; i < pathParts.Count(); i++)
{ {
//var textNode = Path.Combine(childNode.Tag.ToString(), pathParts[i]);
//TreeNode subNode = new TreeNode(textNode);

var subNode = childNode.Nodes.Cast<TreeNode>().FirstOrDefault(n => n.Text == pathParts[i]); var subNode = childNode.Nodes.Cast<TreeNode>().FirstOrDefault(n => n.Text == pathParts[i]);
if (subNode != null) if (subNode != null)
{ {
Expand Down
2 changes: 1 addition & 1 deletion RocksmithToolkitLib/Properties/AssemblyInfo.cs
Expand Up @@ -27,5 +27,5 @@
// //
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT // THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")] [assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("8c0983e6")] [assembly: AssemblyInformationalVersion("7375af81")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
2 changes: 1 addition & 1 deletion RocksmithToolkitUpdater/Properties/AssemblyInfo.cs
Expand Up @@ -29,5 +29,5 @@
// //
// THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT // THESE VALUES ARE PROGRAMMATICALLY GENERATED - DO NOT EDIT
[assembly: AssemblyVersion("2.9.2.0")] [assembly: AssemblyVersion("2.9.2.0")]
[assembly: AssemblyInformationalVersion("8c0983e6")] [assembly: AssemblyInformationalVersion("7375af81")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
2 changes: 1 addition & 1 deletion VersionInfo.txt
@@ -1,3 +1,3 @@
2.9.2.0 2.9.2.0
8c0983e6 7375af81


0 comments on commit a6a668c

Please sign in to comment.