Fixed a bug that double prints

git-svn-id: svn://10.0.0.236/trunk@36895 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dcone%netscape.com
1999-06-25 14:48:37 +00:00
parent 6507ca4ab9
commit 61b2299973
2 changed files with 12 additions and 0 deletions

View File

@@ -427,6 +427,12 @@ nsSimplePageSequenceFrame::Print(nsIPresContext& aPresContext,
page->GetView(&view);
NS_ASSERTION(nsnull != view, "no page view");
vm->Display(view);
// this view was printed and since display set the origin
// 0,0 there is a danger that this view can be printed again
// If it is a sibling to another page/view. Setting the visibility
// to hide will keep this page from printing again - dwc
view->SetVisibility(nsViewVisibility_kHide);
// Finish printing of the page
if (!SendStatusNotification(aStatusCallback, pageNum, totalPages,

View File

@@ -427,6 +427,12 @@ nsSimplePageSequenceFrame::Print(nsIPresContext& aPresContext,
page->GetView(&view);
NS_ASSERTION(nsnull != view, "no page view");
vm->Display(view);
// this view was printed and since display set the origin
// 0,0 there is a danger that this view can be printed again
// If it is a sibling to another page/view. Setting the visibility
// to hide will keep this page from printing again - dwc
view->SetVisibility(nsViewVisibility_kHide);
// Finish printing of the page
if (!SendStatusNotification(aStatusCallback, pageNum, totalPages,