Disable edit action until implemented

- Issue MatterHackers/MCCentral#4458
Remove name edit button - restore when implemented
This commit is contained in:
John Lewin 2018-11-01 14:31:47 -07:00
parent e64406113c
commit d225ac2dd4
2 changed files with 8 additions and 4 deletions

View file

@ -29,6 +29,7 @@ either expressed or implied, of the FreeBSD Project.
using System;
using MatterHackers.Agg;
using MatterHackers.Agg.Image;
using MatterHackers.Agg.Platform;
using MatterHackers.Agg.UI;
using MatterHackers.Localizations;
@ -48,7 +49,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
private GuiWidget saveButton;
private SearchInputBox searchPanel;
public InlineStringEdit(string stringValue, ThemeConfig theme, string automationName, bool boldFont = false)
public InlineStringEdit(string stringValue, ThemeConfig theme, string automationName, bool boldFont = false, bool editable = true)
: base(theme)
{
this.Padding = theme.ToolbarPadding;
@ -98,10 +99,13 @@ namespace MatterHackers.MatterControl.CustomWidgets
rightPanel = new FlowLayoutWidget();
editButton = new IconButton(AggContext.StaticData.LoadIcon("icon_edit.png", 16, 16, theme.InvertIcons), theme)
var icon = editable ? AggContext.StaticData.LoadIcon("icon_edit.png", 16, 16, theme.InvertIcons) : new ImageBuffer(16, 16);
editButton = new IconButton(icon, theme)
{
ToolTipText = "Edit".Localize(),
Name = automationName + " Edit"
Name = automationName + " Edit",
Selectable = editable
};
editButton.Click += (s, e) =>
{

View file

@ -249,7 +249,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
VAnchor = VAnchor.Stretch
};
titleAndTreeView.AddChild(workspaceName = new InlineStringEdit(sceneContext.Scene.Name ?? "", theme, "WorkspaceName")
titleAndTreeView.AddChild(workspaceName = new InlineStringEdit(sceneContext.Scene.Name ?? "", theme, "WorkspaceName", editable: false)
{
Border = new BorderDouble(top: 1),
BorderColor = theme.SplitterBackground