[Kst] branches/kst/hfi_calib/kst/kst

George Staikos staikos at kde.org
Mon Apr 3 11:00:09 CEST 2006


SVN commit 525908 by staikos:

crash fix from trunk


 M  +4 -2      kst.cpp  
 M  +6 -6      kst.h  
 M  +1 -1      main.cpp  


--- branches/kst/hfi_calib/kst/kst/kst.cpp #525907:525908
@@ -1569,7 +1569,7 @@
 }
 
 
-void KstApp::immediatePrintToFile(const QString& filename) {
+void KstApp::immediatePrintToFile(const QString& filename, bool revert) {
   KMdiIterator<KMdiChildView*> *it = createIterator();
   if (!it) {
     return;
@@ -1603,7 +1603,9 @@
 
       view->view()->resizeForPrint(size);
       view->view()->paint(paint, QRegion());
-      view->view()->revertForPrint();
+      if (revert) {
+        view->view()->revertForPrint();
+      }
 
       firstPage = false;
     }
--- branches/kst/hfi_calib/kst/kst/kst.h #525907:525908
@@ -267,17 +267,17 @@
     void slotFilePrint();
 
     /** print without querying */
-    void immediatePrintToFile(const QString &filename);
-    void immediatePrintWindowToFile(KMdiChildView* pWindow, const QString& filename);
+    void immediatePrintToFile(const QString& filename, bool revert = true);
+    void immediatePrintWindowToFile(KMdiChildView *window, const QString& filename);
     void immediatePrintActiveWindowToFile(const QString& filename);
 
     /** export to png without querying */
-    void immediatePrintToPng(const QString &filename, const QString& format = "PNG", int iWidth=640, int iHeight=480, bool bAll=false, int display=0);
-    void immediatePrintWindowToPng(KMdiChildView* pWindow, const QString& filename, const QString& format = "PNG", int iWidth=640, int iHeight=480, int display=0);
-    void immediatePrintActiveWindowToPng(const QString& filename, const QString& format = "PNG", int iWidth=640, int iHeight=480, int display=0);
+    void immediatePrintToPng(const QString& filename, const QString& format = "PNG", int width = 640, int height = 480, bool all = false, int display = 0);
+    void immediatePrintWindowToPng(KMdiChildView *window, const QString& filename, const QString& format = "PNG", int width = 640, int height = 480, int display = 0);
+    void immediatePrintActiveWindowToPng(const QString& filename, const QString& format = "PNG", int width = 640, int height = 480, int display = 0);
 
     /** export to eps without querying */    
-    void immediatePrintToEps(const QString &filename, int iWidth=640, int iHeight=480, bool bAll=false, int display=0);
+    void immediatePrintToEps(const QString& filename, int width = 640, int height = 480, bool all=false, int display = 0);
     void immediatePrintWindowToEps(KMdiChildView *win, const QString& filename, int width, int height, int display);    
     void immediatePrintActiveWindowToEps(const QString& filename, int width, int height, int display);
     
--- branches/kst/hfi_calib/kst/kst/main.cpp #525907:525908
@@ -784,7 +784,7 @@
 
     if (printfile != "<none>") {
       kst->forceUpdate();
-      kst->immediatePrintToFile(printfile);
+      kst->immediatePrintToFile(printfile, false);
     }
 
     if (pngfile != "<none>") {


More information about the Kst mailing list