From ffc7c8f038b08ce709aacc30c5179efd8635fe7c Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Fri, 7 Apr 2023 10:54:04 -0700 Subject: [PATCH] fixing tests --- .../ApplicationView/Application.cs | 6 ++++-- .../ApplicationView/Config/BedConfig.cs | 9 ++++++++- StaticData/Translations/Master.txt | 18 ++++++++++++++++++ Submodules/agg-sharp | 2 +- .../MatterControl/MatterControlUtilities.cs | 13 ++++++++----- 5 files changed, 39 insertions(+), 9 deletions(-) diff --git a/MatterControlLib/ApplicationView/Application.cs b/MatterControlLib/ApplicationView/Application.cs index ed3a44553..18b926e49 100644 --- a/MatterControlLib/ApplicationView/Application.cs +++ b/MatterControlLib/ApplicationView/Application.cs @@ -698,8 +698,10 @@ namespace MatterHackers.MatterControl reporter?.Invoke(0.91, (loading != null) ? loading : "OnLoadActions"); applicationController.OnLoadActions(); - // Wired up to MainView.Load with the intent to fire startup actions and tasks in order with reporting - async void InitialWindowLoad(object s, EventArgs e) + SingleWindowProvider.SetWindowTheme(applicationController.Theme); + + // Wired up to MainView.Load with the intent to fire startup actions and tasks in order with reporting + async void InitialWindowLoad(object s, EventArgs e) { try { diff --git a/MatterControlLib/ApplicationView/Config/BedConfig.cs b/MatterControlLib/ApplicationView/Config/BedConfig.cs index 06354122f..046abcc53 100644 --- a/MatterControlLib/ApplicationView/Config/BedConfig.cs +++ b/MatterControlLib/ApplicationView/Config/BedConfig.cs @@ -228,7 +228,14 @@ namespace MatterHackers.MatterControl { if (moveToOpenPosition) { - PlatingHelper.MoveToOpenPositionRelativeGroup(item, itemsToAvoid); + if (itemsToAvoid.Count() == 0) + { + PlatingHelper.PlaceOnBed(item); + } + else + { + PlatingHelper.MoveToOpenPositionRelativeGroup(item, itemsToAvoid); + } } }, addUndoCheckPoint: addUndoCheckPoint)); diff --git a/StaticData/Translations/Master.txt b/StaticData/Translations/Master.txt index 82c9a2b5e..37e7f6a91 100644 --- a/StaticData/Translations/Master.txt +++ b/StaticData/Translations/Master.txt @@ -946,6 +946,9 @@ Translated:Color Name English:Color View Translated:Color View +English:Columns +Translated:Columns + English:Combine Translated:Combine @@ -1597,6 +1600,9 @@ Translated:Ending Angle English:Ensure the nozzle is clear of any debri or filament Translated:Ensure the nozzle is clear of any debri or filament +English:Enter +Translated:Enter + English:Enter a Design Name Here Translated:Enter a Design Name Here @@ -2149,6 +2155,9 @@ Translated:Generate Supports English:Generates an outline around the support material to improve strength and hold up interface layers. Translated:Generates an outline around the support material to improve strength and hold up interface layers. +English:Generating Config +Translated:Generating Config + English:Generating Lithophane Translated:Generating Lithophane @@ -5098,6 +5107,9 @@ Translated:Starting Angle English:Starting firmware update... Translated:Starting firmware update... +English:Starting slicer +Translated:Starting slicer + English:Starting Sync Translated:Starting Sync @@ -6058,6 +6070,9 @@ Translated:Total Time Printed English:Touch Screen Mode Translated:Touch Screen Mode +English:Trace +Translated:Trace + English:Transform Translated:Transform @@ -6475,6 +6490,9 @@ Translated:We will use this paper to measure the distance between the nozzle and English:Wedge Translated:Wedge +English:Welcome to {0} +Translated:Welcome to {0} + English:Welcome to MatterControl Translated:Welcome to MatterControl diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 4cec2340e..b37ff2170 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 4cec2340ebc82909e9202efb6b09e72e1d3042cd +Subproject commit b37ff21706c047c88be01d9afe3df6e578179f5e diff --git a/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs b/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs index ae584d098..ae82d30b9 100644 --- a/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs +++ b/Tests/MatterControl.Tests/MatterControl/MatterControlUtilities.cs @@ -39,6 +39,7 @@ using MatterHackers.Agg; using MatterHackers.Agg.Image; using MatterHackers.Agg.Platform; using MatterHackers.Agg.UI; +using MatterHackers.Agg.UI.Tests; using MatterHackers.DataConverters3D; using MatterHackers.GuiAutomation; using MatterHackers.MatterControl.CustomWidgets; @@ -776,7 +777,7 @@ namespace MatterHackers.MatterControl.Tests.Automation case "Scripting Row Item Collection": case "Primitives Row Item Collection": // If visible, navigate into Libraries container before opening target - testRunner.DoubleClickByName("Design Apps Row Item Collection") + testRunner.DoubleClickByName("Bundled Row Item Collection") .Delay(); break; @@ -983,11 +984,13 @@ namespace MatterHackers.MatterControl.Tests.Automation int overrideHeight = -1, string defaultTestImages = null) { - // Walk back a step in the stack and output the callers name - // StackTrace st = new StackTrace(false); - // Debug.WriteLine("\r\n ***** Running automation test: {0} {1} ", st.GetFrames().Skip(1).First().GetMethod().Name, DateTime.Now); + Clipboard.SetSystemClipboard(new SimulatedClipboard()); - if (staticDataPathOverride == null) + // Walk back a step in the stack and output the callers name + // StackTrace st = new StackTrace(false); + // Debug.WriteLine("\r\n ***** Running automation test: {0} {1} ", st.GetFrames().Skip(1).First().GetMethod().Name, DateTime.Now); + + if (staticDataPathOverride == null) { // Popping one directory above MatterControl, then back down into MatterControl ensures this works in MCCentral as well and MatterControl staticDataPathOverride = StaticDataPath;