Use default window bounds or overrides

This commit is contained in:
John Lewin 2017-12-18 22:03:17 -08:00
parent 4ed9724634
commit 288352a3a7

View file

@ -592,7 +592,11 @@ namespace MatterHackers.MatterControl.Tests.Automation
AutomationRunner.TimeToMoveMouse = config.TimeToMoveMouse;
AutomationRunner.UpDelaySeconds = config.MouseUpDelay;
rootSystemWindow = Application.LoadRootWindow(overrideWidth, overrideHeight);
var (width, height) = RootSystemWindow.GetStartupBounds();
rootSystemWindow = Application.LoadRootWindow(
overrideWidth == -1 ? width : overrideWidth,
overrideHeight == -1 ? height : overrideHeight);
await AutomationRunner.ShowWindowAndExecuteTests(
rootSystemWindow,