Save works sometimes and asks for a name if no save

This commit is contained in:
Lars Brubaker 2022-02-03 15:02:19 -08:00
parent e3922c88ca
commit e3ede822f9
8 changed files with 51 additions and 48 deletions

View file

@ -92,20 +92,6 @@ namespace MatterHackers.MatterControl.Library
return new FileSystemFileItem(mcxPath);
}
internal ILibraryItem NewDesign()
{
string mcxPath = Path.Combine(this.FullPath, "New Design.mcx");
var count = 0;
while(File.Exists(mcxPath))
{
mcxPath = Path.Combine(this.FullPath, $"New Design ({++count}).mcx");
}
File.WriteAllText(mcxPath, new Object3D().ToJson());
return new FileSystemFileItem(mcxPath);
}
public override void SetThumbnail(ILibraryItem item, int width, int height, ImageBuffer imageBuffer)
{
}