This commit is contained in:
@@ -49,6 +49,7 @@ public partial class DesignerViewModel : ObservableObject
|
||||
[ObservableProperty] private string _selectedPageTemplate = "first";
|
||||
[ObservableProperty] private DesignerPreviewPage? _selectedPreviewPage;
|
||||
[ObservableProperty] private SpecialContentItem? _selectedSpecialContent;
|
||||
[ObservableProperty] private bool _isLegacyContinuationSupported = true;
|
||||
|
||||
public IReadOnlyList<string> Units { get; } = ["mm", "cm", "pt", "in"];
|
||||
public IReadOnlyList<PlaceholderType> PlaceholderTypes { get; } = Enum.GetValues<PlaceholderType>();
|
||||
@@ -586,6 +587,8 @@ public partial class DesignerViewModel : ObservableObject
|
||||
try
|
||||
{
|
||||
var page = new LayoutParser().Parse(value);
|
||||
IsLegacyContinuationSupported = !page.UsesPageTemplates;
|
||||
if (page.UsesPageTemplates) UseContinuationLayout = false;
|
||||
OverlayPageWidth = page.Width; OverlayPageHeight = page.Height; OverlayPageUnit = page.Unit;
|
||||
var names = page.PageTemplates.Select(x => x.Name).ToList();
|
||||
if (names.Count == 0) names.Add("legacy");
|
||||
|
||||
Reference in New Issue
Block a user