Bug 128384

Summary: Printing current page blocks kst
Product: [Applications] kst Reporter: Nicolas Brisset <nicolas.brisset>
Component: generalAssignee: kst
Status: RESOLVED FIXED    
Severity: grave    
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: unspecified   
OS: Solaris   
Latest Commit: Version Fixed In:

Description Nicolas Brisset 2006-05-31 19:00:11 UTC
Version:           1.3.0_devel (using KDE 3.4.0, compiled sources)
Compiler:          gcc version 3.4.3
OS:                SunOS (sun4u) release 5.8

When printing the current page in a multi-page document, the windows are no longer refreshed and kst is frozen.

To reproduce:
1) load 2 columns from gyrodata.dat into 2 plots
2) put them in two windows
3) with W1 active, call the print dialog and select "Current page", print to a .ps file
4) click "Print": the file is generated 
5) click on W2: the window is not repainted, and from now on the situation is pretty bad: it is as if only the printed window still existed

Note that the printing system used is LPR/LPRng (because I'm on a Solaris machine, and CUPS is not installed :-()
Comment 1 Nicolas Brisset 2006-05-31 19:05:55 UTC
Interestingly, when I tried this again to see whether I had clicked on the W2 tab too early, I pressed F2 to switch back to zoom mode (I was still in layout mode when printing) and kst crashed with the following:
Assertion failed: !_buffer.buffer().isNull(), file kst2dplot.cpp, line 2355
Comment 2 Andrew Walker 2006-05-31 23:10:31 UTC
SVN commit 547111 by arwalker:

BUG:128384 Move code to correct indentation level

 M  +3 -4      kst.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kst.cpp #547110:547111
@@ -1578,11 +1578,10 @@
             }
           }
         }
+        win->view()->revertForPrint();
+        
+        firstPage = false;
       }
-
-      win->view()->revertForPrint();
-
-      firstPage = false;
     }
     it->next();
   }