< prev index next >
src/java.desktop/share/classes/sun/print/RasterPrinterJob.java
Print this page
*** 738,748 ****
if (service == null) {
return page;
}
updatePageAttributes(service, page);
! PageFormat newPage = pageDialog(attributes);
if (newPage == null) {
return page;
} else {
return newPage;
--- 738,760 ----
if (service == null) {
return page;
}
updatePageAttributes(service, page);
! PageFormat newPage = null;
! DialogTypeSelection dts =
! (DialogTypeSelection)attributes.get(DialogTypeSelection.class);
! if (dts == DialogTypeSelection.NATIVE) {
! // Remove DialogTypeSelection.NATIVE to prevent infinite loop in
! // RasterPrinterJob.
! attributes.remove(DialogTypeSelection.class);
! newPage = pageDialog(attributes);
! // restore attribute
! attributes.add(DialogTypeSelection.NATIVE);
! } else {
! newPage = pageDialog(attributes);
! }
if (newPage == null) {
return page;
} else {
return newPage;
< prev index next >