Bug 276984

Summary: Text shape handles leave artefacts when text shape is moved
Product: [Applications] krita Reporter: Kubuntiac <user581>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: alecail, halla, mifrosu, sven.langkamp
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: .Kra File demonstrating text shape artefacts
Image showing the artefacts I see when moving the text in the above .kra file

Description Kubuntiac 2011-07-03 04:47:55 UTC
Created attachment 61560 [details]
.Kra File demonstrating text shape artefacts

Version:           svn trunk (using KDE 4.6.4) 
OS:                Linux

When moving a text shape, the handles (the yellow squares used for rescaling) seem to leave artefacts onscreen. Other vector shapes such as the freehand line and calligraphy line don't seem to do this.

Reproducible: Always

Steps to Reproduce:
1. Open the attached .kra
2. Select the vector layer up the top
3. Select the vector select tool
4. Move the text at the top of the image (especially left and right)

Actual Results:  
Artefacts are left on screen.

Expected Results:  
No artefacts are left on screen.

OS: Linux (i686) release 2.6.38-8-generic-pae
Compiler: cc
Comment 1 Kubuntiac 2011-07-03 04:49:55 UTC
Created attachment 61561 [details]
Image showing the artefacts I see when moving the text in the above .kra file
Comment 2 Halla Rempt 2011-07-03 13:20:41 UTC
Yes, it's definitely possible to get these artifacts. It doesn't always happen, and I've seen it with other shapes as well.
Comment 3 Michael O'Sullivan 2012-07-24 14:53:05 UTC
Artefacts are always present if a shape is moved slowly towards the top left of the canvas. An area around the shape is cleared upon mouse release, but a trail remains if the shape has been moved a significant distance. 

Seems to be a repainting problem related to the bottom lines of the lower-most handles, and the right lines of the right-most handles. Interestingly, when a shape is moved to the right or downwards those handle edge lines are not always painted.

This doesn't seem to happen in Karbon.

I've tried messing around with the HANDLE_SIZE macro setting in calligra/plugins/defaultTools/defaulttool/DefaultTool.cpp in an attempt to extend the bounding box during shape move, but that was no help.
Comment 4 Sven Langkamp 2012-07-25 02:37:00 UTC
Usually in updating problems there is a problems with the update rect. So you could start by checking the rect that is updated in the canvas and see if that's at the right place. It also helps sometimes to simply draw the update rect and see if it stays around the shape.
Comment 5 Sven Langkamp 2012-08-02 23:34:51 UTC
Git commit 8a054d066da2bba009a47ff24a8d2dbd86b77c30 by Sven Langkamp.
Committed on 03/08/2012 at 01:31.
Pushed by langkamp into branch 'master'.

adjust update rect slightly to avoid artifacts in rubberband due to anti-aliasing
Patch by Michael O'Sullivan

M  +1    -0    krita/ui/canvas/kis_canvas2.cpp

http://commits.kde.org/calligra/8a054d066da2bba009a47ff24a8d2dbd86b77c30
Comment 6 Halla Rempt 2012-08-13 15:59:35 UTC
Git commit 1513cf43f9ff0846a3048c63fc49aeb87b342ef9 by Boudewijn Rempt, on behalf of Sven Langkamp.
Committed on 03/08/2012 at 01:31.
Pushed by rempt into branch 'calligra/2.5'.

adjust update rect slightly to avoid artifacts in rubberband due to anti-aliasing
Patch by Michael O'Sullivan

M  +1    -0    krita/ui/canvas/kis_canvas2.cpp

http://commits.kde.org/calligra/1513cf43f9ff0846a3048c63fc49aeb87b342ef9
Comment 7 Sven Langkamp 2012-08-19 11:20:16 UTC
*** Bug 305425 has been marked as a duplicate of this bug. ***