center numbers

This commit is contained in:
MatterHackers 2023-12-03 16:51:13 -08:00
parent 459244fd37
commit 15767dcd33
2 changed files with 29 additions and 22 deletions

View file

@ -488,7 +488,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
if (!string.IsNullOrEmpty(filePath)
&& File.Exists(filePath))
{
if (Path.GetExtension(filePath).ToLower() == ".mcx")
switch (Path.GetExtension(filePath).ToLower())
{
case ".mcx":
{
if (ApplicationController.Instance.SwitchToWorkspaceIfAlreadyOpen(filePath))
{
@ -506,11 +508,15 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
ApplicationController.Instance.OpenWorkspace(workspace, WorkspacesChangedEventArgs.OperationType.Add);
}
else
break;
default:
{
var workspace = await CreateNewDesignTab(false);
workspace.SceneContext.AddToPlate(new string[] { filePath }, false);
}
break;
}
}
}

View file

@ -110,6 +110,7 @@ namespace MatterHackers.MatterControl.DesignTools
numCell.AddChild(new TextWidget((y + 1).ToString())
{
TextColor = theme.TextColor,
HAnchor = HAnchor.Center,
VAnchor = VAnchor.Center,
});