carbon: no-printer failure patch by Patrick Chevalley, #17120

git-svn-id: trunk@29475 -
This commit is contained in:
dmitry 2011-02-12 04:36:48 +00:00
parent 1491b94132
commit fb560e9128
2 changed files with 6 additions and 2 deletions

View File

@ -297,8 +297,13 @@ begin
end;
procedure TCarbonPrinter.UpdatePrinter;
var
s: string;
begin
SetPrinter(GetCurrentPrinterName);
s := GetCurrentPrinterName;
if trim(s) = '' then // Observed if Default printer set to "Use last printer", and no printing done
s := '*'; // so select lcl default
SetPrinter(s);
Validate;
end;

View File

@ -14,7 +14,6 @@ begin
// TODO: set and get paper margins, title
if not Assigned(Printer) then Exit;
if Printer.Printers.Count <= 0 then Exit;
CarbonPrinter := Printer as TCarbonPrinter;