Bug 1643418. Don't overwrite the print range type if 'Print Selection Only' is unchecked. r=nordzilla

Differential Revision: https://phabricator.services.mozilla.com/D78394
This commit is contained in:
Jonathan Watt 2020-06-04 21:09:12 +00:00
parent 01ecd3cda9
commit 4f0f4b029d

View File

@ -260,9 +260,9 @@ static const char sHeaderFooterTags[][4] = {"", "&T", "&U", "&D", "&P", "&PT"};
}
- (void)exportSettings {
mSettings->SetPrintRange([mPrintSelectionOnlyCheckbox state] == NSOnState
? (int16_t)nsIPrintSettings::kRangeSelection
: (int16_t)nsIPrintSettings::kRangeAllPages);
if ([mPrintSelectionOnlyCheckbox state] == NSOnState) {
mSettings->SetPrintRange(nsIPrintSettings::kRangeSelection);
}
mSettings->SetShrinkToFit([mShrinkToFitCheckbox state] == NSOnState);
mSettings->SetPrintBGColors([mPrintBGColorsCheckbox state] == NSOnState);
mSettings->SetPrintBGImages([mPrintBGImagesCheckbox state] == NSOnState);