Printing / Page settings reset themselves after print (no landscape printing)

bug=147605 r=petez sr=jst a=asa patch=Roland.Mainz@informatik.med.uni-giessen.de
Thanks Roland for this patch!
This commit is contained in:
pete.zha%sun.com 2002-07-26 22:58:24 +00:00
parent 210e8b4a60
commit fbfc45c94e

View File

@ -197,19 +197,20 @@ function setPrinterDefaultsForSelectedPrinter()
{
/* FixMe: We should save the old printer's values here... */
gPrintSettings.printerName = dialog.printerList.value;
// First get any defaults from the printer
printService.initPrintSettingsFromPrinter(gPrintSettings.printerName, gPrintSettings);
if (gPrintSettings.printerName != dialog.printerList.value) {
gPrintSettings.printerName = dialog.printerList.value;
var flags = gPrintSetInterface.kInitSavePaperSizeType | gPrintSetInterface.kInitSavePaperSizeUnit |
gPrintSetInterface.kInitSavePaperWidth | gPrintSetInterface.kInitSavePaperHeight |
gPrintSetInterface.kInitSavePaperName |
gPrintSetInterface.kInitSavePrintCommand;
// First get any defaults from the printer
printService.initPrintSettingsFromPrinter(gPrintSettings.printerName, gPrintSettings);
// now augment them with any values from last time
printService.initPrintSettingsFromPrefs(gPrintSettings, true, flags);
var flags = gPrintSetInterface.kInitSavePaperSizeType | gPrintSetInterface.kInitSavePaperSizeUnit |
gPrintSetInterface.kInitSavePaperWidth | gPrintSetInterface.kInitSavePaperHeight |
gPrintSetInterface.kInitSavePaperName |
gPrintSetInterface.kInitSavePrintCommand;
// now augment them with any values from last time
printService.initPrintSettingsFromPrefs(gPrintSettings, true, flags);
}
}
//---------------------------------------------------