Skip to content

Commit

Permalink
Improve type checking on TSVNTreeViewItem
Browse files Browse the repository at this point in the history
  • Loading branch information
sboulema committed Jan 9, 2018
1 parent e3cb6ad commit 627a2ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TSVN/TSVNToolWindowControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private void ProcessChange(TSVNTreeViewFolderItem root, string solutionDir, stri
var path = change.Substring(8);
var pathParts = path.Split('\\');

for (int i = 0; i < pathParts.Length; i++)
for (var i = 0; i < pathParts.Length; i++)
{
var item = FindItem(root, pathParts[i]);
if (item == null)
Expand All @@ -93,9 +93,9 @@ private void ProcessChange(TSVNTreeViewFolderItem root, string solutionDir, stri

root.Items.Add(newItem);
}
else
else if (item is TSVNTreeViewFolderItem folderItem)
{
root = (TSVNTreeViewFolderItem)item;
root = folderItem;
}
}
}
Expand Down

0 comments on commit 627a2ec

Please sign in to comment.