Skip to content

Commit

Permalink
Merge pull request #520 from storybuilder-org/FixSingleNodePrinting
Browse files Browse the repository at this point in the history
Fix issues with print single node
  • Loading branch information
terrycox authored Feb 28, 2023
2 parents 72a8be6 + fd8da39 commit 37e4fd2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions StoryBuilderLib/ViewModels/Tools/PrintReportDialogVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 37e4fd2

Please sign in to comment.