Bug 60678

Summary: Frames are not redrawn when needed (typing up labels with identical frames)
Product: kword Reporter: Sean Lynch <techniq35>
Component: generalAssignee: Thomas Zander <zander>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Redraw problem

Description Sean Lynch 2003-07-03 09:32:45 UTC
Version:           1.2.91 (using KDE 3.1.9)
Compiler:          gcc version 3.3 20030226 (prerelease) (SuSE Linux)
OS:          Linux (i686) release 2.4.20-4GB-athlon

When writing a label document in kword, the child frames (not the top right frame/label) will not update unless you scroll it off the screen, then back on; or drag another application over kword over the frames.  Seems they are not told to redraw after each new character input.  (see attachment).

Also, I plan to make as many label templates as possible, such as so you can pick an avery 8139 template of labels, or whatever type of label/paper you bought.  Will this be ok to do so, and do you think it will make it into 1.3?  Also, since there would be alot of labels (many different manufactors, paper/label types, etc), would it be best to have some dropdown menus added to the new Create Document dialog?
Comment 1 Sean Lynch 2003-07-03 09:33:13 UTC
Created attachment 1928 [details]
Redraw problem
Comment 2 David Faure 2003-07-07 00:31:32 UTC
Subject: koffice/kword

CVS commit by faure: 

Fixed long-standing bug: wrong repainting in copied frames
CCMAIL: 60678-done@bugs.kde.org


  M +7 -3      kwframe.cc   1.386


--- koffice/kword/kwframe.cc  #1.385:1.386
@@ -1144,11 +1144,15 @@ void KWFrameSet::drawContents( QPainter 
         //double lastRealFrameTop = 0;
         //double totalHeight = 0; // in pt, to avoid accumulating rounding errors
-        for ( ; frameIt.current(); ++frameIt )
+        for ( ; frameIt.current(); )
         {
             KWFrame *frame = frameIt.current();
+            ++frameIt; // Point to the next one, to detect "last copy"
             // The settings come from this frame
             KWFrame * settingsFrame = ( frame->isCopy() && lastRealFrame ) ? lastRealFrame : frame;
-
-            drawFrameAndBorders( frame, p, crect, cg, onlyChanged, resetChanged, edit,
+            bool lastCopy = !frameIt.current() || !frameIt.current()->isCopy();
+            drawFrameAndBorders( frame, p, crect, cg, onlyChanged,
+                                 // Only reset the changed flag in the last copy of a given frame (#60678)
+                                 resetChanged && lastCopy,
+                                 edit,
                                  viewMode, settingsFrame, true /*transparency & double-buffering*/ );
             if ( !lastRealFrame || !frame->isCopy() )