diff --git a/AIStudio.Wpf.DiagramDesigner/Models/Serializables/DiagramItem.cs b/AIStudio.Wpf.DiagramDesigner/Models/Serializables/DiagramItem.cs index 893c37a..9212d3f 100644 --- a/AIStudio.Wpf.DiagramDesigner/Models/Serializables/DiagramItem.cs +++ b/AIStudio.Wpf.DiagramDesigner/Models/Serializables/DiagramItem.cs @@ -34,6 +34,7 @@ namespace AIStudio.Wpf.DiagramDesigner PageBackground = diagramView.DiagramOption.LayoutOption.PageBackground; AllowDrop = diagramView.DiagramOption.LayoutOption.AllowDrop; + GenerateThumbnail = diagramView.GenerateThumbnail; Thumbnail = diagramView.Thumbnail?.ToBase64String(); var selectedDesignerItems = diagramView.Items.OfType(); @@ -202,5 +203,12 @@ namespace AIStudio.Wpf.DiagramDesigner { get; set; } + + [XmlAttribute] + public bool GenerateThumbnail + { + + get;set; + } } } diff --git a/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/DiagramViewModel.cs b/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/DiagramViewModel.cs index 147b9b5..0c811c8 100644 --- a/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/DiagramViewModel.cs +++ b/AIStudio.Wpf.DiagramDesigner/ViewModels/BaseViewModel/DiagramViewModel.cs @@ -876,9 +876,11 @@ namespace AIStudio.Wpf.DiagramDesigner DiagramOption.LayoutOption.PhysicalGridMarginSize = diagramItem.PhysicalGridMarginSize; DiagramOption.LayoutOption.GridColor = diagramItem.GridColor; DiagramOption.LayoutOption.PageBackground = diagramItem.PageBackground; - DiagramOption.LayoutOption.AllowDrop = diagramItem.AllowDrop; + DiagramOption.LayoutOption.AllowDrop = diagramItem.AllowDrop; + GenerateThumbnail = diagramItem.GenerateThumbnail; Thumbnail = diagramItem.Thumbnail?.ToBrush((int)DiagramOption.LayoutOption.PageSize.Width, (int)DiagramOption.LayoutOption.PageSize.Height); + Init(true); }