Show message about cancelling printing less intrusively

Getting a message box after cancelling printing was really annoying
while testing the printing dialog, so replace it with a status message.
This commit is contained in:
Vadim Zeitlin 2023-03-22 17:23:25 +01:00
parent e93570f681
commit f80efc9992

View file

@ -370,6 +370,8 @@ void MyFrame::OnPrint(wxCommandEvent& WXUNUSED(event))
// instance in order to evaluate users inputs.
MyPrintout printout(this, &printer.GetPrintDialogData(), "My printout");
SetStatusText(""); // clear previous "cancelled" message, if any
if (!printer.Print(this, &printout, true /*prompt*/))
{
if (wxPrinter::GetLastError() == wxPRINTER_ERROR)
@ -378,7 +380,7 @@ void MyFrame::OnPrint(wxCommandEvent& WXUNUSED(event))
}
else
{
wxLogMessage("You canceled printing");
wxLogStatus("You canceled printing");
}
}
else