Skip to content

Commit

Permalink
Fix printing for text control
Browse files Browse the repository at this point in the history
Fixes page ranges and uses the paper white printing method
  • Loading branch information
Blake-Madden committed Dec 17, 2023
1 parent c63d836 commit 778dd22
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ui/controls/formattedtextctrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,11 @@ void FormattedTextCtrl::OnPrint([[maybe_unused]] wxCommandEvent& event)
{
printer.GetPrintDialogData().SetPrintData(*m_printData);
}
if (!printer.Print(this, printOut, true) )
printer.GetPrintDialogData().SetAllPages(true);
printer.GetPrintDialogData().SetFromPage(1);
printer.GetPrintDialogData().SetMinPage(1);
printer.GetPrintDialogData().EnableSelection(false);
if (!printer.Print(m_printWindow, printOut, true))
{
// just show a message if a real error occurred.
// They may have just cancelled.
Expand Down

0 comments on commit 778dd22

Please sign in to comment.