diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-08-23 01:07:54 +0300 |
---|---|---|
committer | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-08-23 01:07:54 +0300 |
commit | 3400e87c30387d3fd6cbf95f2703fc19d858ba13 (patch) | |
tree | 06dc9d292a12c37760ba3000471c1550d537ed4f | |
parent | 90ce7a22f51a11c28dafc49ae7381b341d6d19c4 (diff) |
[Ide] Simplify navigation service rename searchmonodevelop-5.10.0.609
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryService.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryService.cs index a1af09c25c..c8ff32acb6 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryService.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Navigation/NavigationHistoryService.cs @@ -349,12 +349,11 @@ namespace MonoDevelop.Ide.Navigation bool closedHistoryChanged = false; foreach (ProjectFileRenamedEventInfo args in e) { foreach (NavigationHistoryItem point in history) { - DocumentNavigationPoint dp = point.NavigationPoint as DocumentNavigationPoint; + var dp = point.NavigationPoint as DocumentNavigationPoint; historyChanged &= (dp != null && dp.HandleRenameEvent (args.OldName, args.NewName)); - } - foreach (NavigationHistoryItem point in history) { - DocumentNavigationPoint cdp = point.NavigationPoint as DocumentNavigationPoint; - closedHistoryChanged &= (cdp != null && cdp.HandleRenameEvent (args.OldName, args.NewName)); + closedHistoryChanged &= (dp != null && dp.HandleRenameEvent (args.OldName, args.NewName)); + if (historyChanged && closedHistoryChanged) + break; } } if (historyChanged) |