diff --git a/Directory.Build.props b/Directory.Build.props index 60c623f..bcf22fe 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ Robots - 1.0.4 + 1.1.0 Create and simulate ABB, KUKA, UR and Staubli robot programs. Robots Authors Copyright (c) 2021 $(Authors) diff --git a/src/Robots.Grasshopper/RobotSystem/LoadRobotSystem.cs b/src/Robots.Grasshopper/RobotSystem/LoadRobotSystem.cs index 434cd96..f630949 100644 --- a/src/Robots.Grasshopper/RobotSystem/LoadRobotSystem.cs +++ b/src/Robots.Grasshopper/RobotSystem/LoadRobotSystem.cs @@ -91,13 +91,18 @@ void UpdateValueList() foreach (string robotSystemName in robotSystems) valueList.ListItems.Add(new GH_ValueListItem(robotSystemName, $"\"{robotSystemName}\"")); - if (selected is null) - return; + if (selected is not null) + { + var selectedIndex = valueList.ListItems.FindIndex(s => s.Name == selected.Name); - var selectedIndex = valueList.ListItems.FindIndex(s => s.Name == selected.Name); + if (selectedIndex != -1) + { + valueList.SelectItem(selectedIndex); + return; + } + } - if (selectedIndex != -1) - valueList.SelectItem(selectedIndex); + valueList.ExpireSolution(true); } // form diff --git a/tests/Robots.Tests/Program.cs b/tests/Robots.Tests/Program.cs index 4b63708..db81fed 100644 --- a/tests/Robots.Tests/Program.cs +++ b/tests/Robots.Tests/Program.cs @@ -5,4 +5,4 @@ //new Performance(); //var github = new OnlineLibrary(); -//await github.UpdateLibraryAsync(); +//await github.UpdateLibraryAsync(); \ No newline at end of file diff --git a/tests/Robots.Tests/Robots.Tests.csproj b/tests/Robots.Tests/Robots.Tests.csproj index 675606c..f8859b0 100644 --- a/tests/Robots.Tests/Robots.Tests.csproj +++ b/tests/Robots.Tests/Robots.Tests.csproj @@ -3,7 +3,7 @@ net6.0 false - false + true