@@ -95,8 +95,10 @@ QtVTKPrintHelper::PrinterStatus QtVTKPrintHelper::print (vtkRenderWindow& window
9595 // S'assurer que la boite de dialogue d'impression ait bien disparue.
9696 if (0 != top)
9797 top->raise ( );
98+ #ifdef QT_5
9899 while (true == qApp->hasPendingEvents ( ))
99100 qApp->processEvents ( );
101+ #endif // QT_5
100102 QtAutoWaitingCursor cursor (true );
101103 if (printer.outputFileName ( ).size ( ) != 0 )
102104 {
@@ -125,7 +127,7 @@ QtVTKPrintHelper::PrinterStatus QtVTKPrintHelper::print (vtkRenderWindow& window
125127 string tmpPSFile (tmpFile + " .ps" );
126128 PrintCommand::CommandOptions options;
127129 options.eraseFile = true ;
128- options.copiesNumber = (size_t )printer.numCopies ( );
130+ options.copiesNumber = (size_t )printer.copyCount ( );
129131 printToFile (window, tmpPSFile, 720 );
130132 string printerName = printer.printerName ( ).toStdString ( );
131133 printToPrinter (tmpPSFile, printerName, options);
@@ -206,8 +208,10 @@ QtVTKPrintHelper::PrinterStatus QtVTKPrintHelper::printToFile (vtkRenderWindow&
206208 // S'assurer que la boite de dialogue d'impression ait bien disparue.
207209 if (0 != top)
208210 top->raise ( );
211+ #ifdef QT_5
209212 while (true == qApp->hasPendingEvents ( ))
210213 qApp->processEvents ( );
214+ #endif // QT_5
211215 QtAutoWaitingCursor cursor (true );
212216
213217 QStringList fileList = dialog.selectedFiles ( );
@@ -262,8 +266,10 @@ QtVTKPrintHelper::PrinterStatus QtVTKPrintHelper::printTo4kFile (vtkRenderWindow
262266 // S'assurer que la boite de dialogue d'impression ait bien disparue.
263267 if (0 != top)
264268 top->raise ( );
269+ #ifdef QT_5
265270 while (true == qApp->hasPendingEvents ( ))
266271 qApp->processEvents ( );
272+ #endif // QT_5
267273 QtAutoWaitingCursor cursor (true );
268274
269275 QStringList fileList = dialog.selectedFiles ( );
0 commit comments