diff --git a/ERVertexPath/ERMultiRoadPathCreator.cs b/ERVertexPath/ERMultiRoadPathCreator.cs index 00497b6..9e6fccf 100644 --- a/ERVertexPath/ERMultiRoadPathCreator.cs +++ b/ERVertexPath/ERMultiRoadPathCreator.cs @@ -34,7 +34,7 @@ namespace ERVertexPath isInitialized = true; - allRoadsPathCreator.Init(); + allRoadsPathCreator.Init(forceInit); var lowerNameMask = roadNameMask.ToLower(); var roads = new ERRoadNetwork().GetRoads().Where(_road => _road.GetName().ToLower().Contains(lowerNameMask)); diff --git a/ERVertexPath/ERNetworkVertexPathCreator.cs b/ERVertexPath/ERNetworkVertexPathCreator.cs index 449638b..c2efc42 100644 --- a/ERVertexPath/ERNetworkVertexPathCreator.cs +++ b/ERVertexPath/ERNetworkVertexPathCreator.cs @@ -19,9 +19,9 @@ namespace ERVertexPath Init(); } - public void Init() + public void Init(bool forceInit = false) { - if (isInitialized) + if (!forceInit && isInitialized) { return; }