display a message if we can't find any print handlers to handle the FilePrint command
This commit is contained in:
parent
a2f874a728
commit
de321a3e39
@ -1190,7 +1190,8 @@ namespace UniversalEditor.UserInterface
|
||||
public void PrintDocument()
|
||||
{
|
||||
Editor editor = GetCurrentEditor ();
|
||||
if (editor != null) {
|
||||
if (editor != null)
|
||||
{
|
||||
PrintHandlerReference[] phrs = UniversalEditor.Printing.Reflection.GetAvailablePrintHandlers(editor.ObjectModel);
|
||||
if (phrs.Length > 0)
|
||||
{
|
||||
@ -1210,6 +1211,10 @@ namespace UniversalEditor.UserInterface
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageDialog.ShowDialog(String.Format("No print handlers are associated with the ObjectModel.\r\n\r\n{0}", editor.ObjectModel?.GetType()?.FullName ?? "(null)"), "Print Document", MessageDialogButtons.OK, MessageDialogIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user