Bug 342869

Summary: Wrong layout after undo
Product: [Applications] calligrawords Reporter: Inge Wallin <inge>
Component: generalAssignee: Calligra Words Bugs <calligra-words-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.9 Pre-Alpha   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Inge Wallin 2015-01-15 10:46:14 UTC
After deleting the character - and picture - as described in bug 342867, do an Undo.  The text will now be placed under the picture instead of around it.

Reproducible: Always

Steps to Reproduce:
1. Follow instructions in bug 342867
2. Press undo
3.

Actual Results:  
Text will be placed under the picture

Expected Results:  
Text should be placed around the picture.
Comment 1 Camilla Boemann 2015-01-15 16:01:43 UTC
Git commit b0c9d4cbff5ed35ddf91042a4f2719a84e7b29dc by C. Boemann.
Committed on 15/01/2015 at 14:05.
Pushed by boemann into branch 'calligra/2.9'.

Fix undo redo of textranges - we might have swapped anchor and pos
in general that would not be that big a deal if not for a qt bug which makes the anchor travel even if
the qtextcursor has keepPositionOnInsert() == true

There was another part to this bug - we didn't make sure the text was relayouted

so in short: the anchor was lost (misplaced) and the relayout was never initiated

M  +6    -6    libs/kotext/KoTextRange.cpp
M  +2    -0    libs/kotext/commands/DeleteAnchorsCommand.cpp

http://commits.kde.org/calligra/b0c9d4cbff5ed35ddf91042a4f2719a84e7b29dc