diff --git a/MatterControlLib/PartPreviewWindow/MainViewWidget.cs b/MatterControlLib/PartPreviewWindow/MainViewWidget.cs index 426388a55..c6f802b33 100644 --- a/MatterControlLib/PartPreviewWindow/MainViewWidget.cs +++ b/MatterControlLib/PartPreviewWindow/MainViewWidget.cs @@ -488,29 +488,35 @@ namespace MatterHackers.MatterControl.PartPreviewWindow if (!string.IsNullOrEmpty(filePath) && File.Exists(filePath)) { - if (Path.GetExtension(filePath).ToLower() == ".mcx") - { - if (ApplicationController.Instance.SwitchToWorkspaceIfAlreadyOpen(filePath)) - { - return; - } + switch (Path.GetExtension(filePath).ToLower()) + { + case ".mcx": + { + if (ApplicationController.Instance.SwitchToWorkspaceIfAlreadyOpen(filePath)) + { + return; + } - var history = ApplicationController.Instance.Library.PlatingHistory; - var workspace = new PartWorkspace(new BedConfig(history)); - // Load the previous content - await workspace.SceneContext.LoadContent(new EditContext() - { - ContentStore = history, - SourceItem = new FileSystemFileItem(filePath) - }, null); + var history = ApplicationController.Instance.Library.PlatingHistory; + var workspace = new PartWorkspace(new BedConfig(history)); + // Load the previous content + await workspace.SceneContext.LoadContent(new EditContext() + { + ContentStore = history, + SourceItem = new FileSystemFileItem(filePath) + }, null); - ApplicationController.Instance.OpenWorkspace(workspace, WorkspacesChangedEventArgs.OperationType.Add); - } - else - { - var workspace = await CreateNewDesignTab(false); - workspace.SceneContext.AddToPlate(new string[] { filePath }, false); - } + ApplicationController.Instance.OpenWorkspace(workspace, WorkspacesChangedEventArgs.OperationType.Add); + } + break; + + default: + { + var workspace = await CreateNewDesignTab(false); + workspace.SceneContext.AddToPlate(new string[] { filePath }, false); + } + break; + } } } diff --git a/MatterControlLib/PartPreviewWindow/View3D/Actions/SheetEditor.cs b/MatterControlLib/PartPreviewWindow/View3D/Actions/SheetEditor.cs index 4ce28067a..d74f13d5f 100644 --- a/MatterControlLib/PartPreviewWindow/View3D/Actions/SheetEditor.cs +++ b/MatterControlLib/PartPreviewWindow/View3D/Actions/SheetEditor.cs @@ -110,7 +110,8 @@ namespace MatterHackers.MatterControl.DesignTools numCell.AddChild(new TextWidget((y + 1).ToString()) { TextColor = theme.TextColor, - VAnchor = VAnchor.Center, + HAnchor = HAnchor.Center, + VAnchor = VAnchor.Center, }); numCell.BackgroundColor = theme.SlightShade;