Save as causes the file dest to change and the tab name

Refactoring
Add dispose to content store
Added event for source item changed on edit context
Added rename to extensions method
Added local file path to tab tool tip
This commit is contained in:
Lars Brubaker 2022-02-02 17:31:44 -08:00
parent 9ef5181983
commit 1095d6741a
15 changed files with 141 additions and 116 deletions

View file

@ -462,7 +462,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
"Cancel Print".Localize(),
"Continue Printing".Localize());
}
else if (this.TabContent is PartTabPage partTab
else if (this.TabContent is DesignTabPage partTab
&& partTab?.Workspace?.SceneContext?.Scene is InteractiveScene sceneContext
&& sceneContext.HasUnsavedChanges)
{
@ -744,7 +744,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
base.OnClosed(e);
}
public string Title
public override string Text
{
get => tabPill?.Text;
set
@ -756,6 +756,18 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
}
}
public override string ToolTipText
{
get => tabPill?.ToolTipText;
set
{
if (tabPill != null)
{
tabPill.ToolTipText = value;
}
}
}
public static void DrawTabLowerRight(Graphics2D graphics2D, RectangleDouble rect, Color color)
{
// Tab - right nub