From fd8da3910b00c619c81dce5e454a6885d1cbf50b Mon Sep 17 00:00:00 2001 From: Jake <49795711+Rarisma@users.noreply.github.com> Date: Tue, 28 Feb 2023 19:43:15 +0000 Subject: [PATCH] Fix issues with print single node --- StoryBuilderLib/ViewModels/Tools/PrintReportDialogVM.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/StoryBuilderLib/ViewModels/Tools/PrintReportDialogVM.cs b/StoryBuilderLib/ViewModels/Tools/PrintReportDialogVM.cs index 6aaf1eb4..0fe87a63 100644 --- a/StoryBuilderLib/ViewModels/Tools/PrintReportDialogVM.cs +++ b/StoryBuilderLib/ViewModels/Tools/PrintReportDialogVM.cs @@ -192,9 +192,12 @@ public async Task PrintSingleNode(StoryNodeItem elementItem) SelectedNodes.Clear(); //Only print single node PrintReports _rpt = new(this, ShellViewModel.GetModel()); - await _rpt.Generate(); + + if (elementItem.Type == StoryItemType.StoryOverview) {CreateOverview = true; } + else { SelectedNodes.Add(elementItem); } - await new PrintReports(this, ShellViewModel.GetModel()).Generate(); + _rpt.Print(await _rpt.Generate()); + CreateOverview = false; } public void RegisterForPrint()