[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1743
Date       : Wed Sep  6 10:32:51 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/camview.cpp

Fixed spurious internal error on printing as per bug #1609. Flag printing
has ended after job has actually been sent to lpr via wxPostScriptDC's End()
method. This is because it uses wxExecute(), which yields, causing idle
events, and if we flag the job has ended first then this causes the idle
event to be processed (rather than skipped during printing) - this is
problematic for many reasons, though I believe is cosmetic in result.


Diff:
Index: Trunk/XaraLX/wxOil/camview.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camview.cpp	(revision 1742)
+++ Trunk/XaraLX/wxOil/camview.cpp	(revision 1743)
@@ -1351,9 +1351,6 @@
 
 
 ExitPrint:
-	// cleanup document printing process
-	PrintMonitor::EndPrintJob();
-
 	if (!bError)
 		pPrintInfo->GetDC()->EndDoc();
 	else
@@ -1367,6 +1364,9 @@
 			InformError();
 	}
 
+	// cleanup document printing process
+	PrintMonitor::EndPrintJob();
+
 //	AfxGetMainWnd()->EnableWindow();    // enable main window
 
 //	OnEndPrinting(pPrintInfo->GetDC(), pPrintInfo);    // clean up after printing


Xara