Cups printers: preserve page orientation when setting default values. issue #19618

git-svn-id: trunk@31371 -
This commit is contained in:
zeljko 2011-06-25 07:01:32 +00:00
parent 264c6db01f
commit 9b2bd8b9bb

View File

@ -293,6 +293,7 @@ end;
//Initialization of selected Printer options //Initialization of selected Printer options
procedure TdlgSelectPrinter.InitPrinterOptions; procedure TdlgSelectPrinter.InitPrinterOptions;
Var St : string; Var St : string;
pOr : TPrinterOrientation;
//Convert an Local hour to GMT hour //Convert an Local hour to GMT hour
function GetTimeHold : string; function GetTimeHold : string;
@ -310,10 +311,13 @@ Var St : string;
begin begin
if not fPropertiesSetting then if not fPropertiesSetting then
begin begin
//Preserve selected orientation - isn't stored in cups options
pOr:=Printer.Orientation;
//Free current options if exists //Free current options if exists
THackCUPSPrinter(Printer).FreeOptions; THackCUPSPrinter(Printer).FreeOptions;
//Initialize default Options //Initialize default Options
THackCUPSPrinter(Printer).SetOptionsOfPrinter; THackCUPSPrinter(Printer).SetOptionsOfPrinter;
Printer.Orientation := pOr;
end; end;
//Copies //Copies