Bug 342869 - Wrong layout after undo
Summary: Wrong layout after undo
Status: RESOLVED FIXED
Alias: None
Product: calligrawords
Classification: Applications
Component: general (show other bugs)
Version: 2.9 Pre-Alpha
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Calligra Words Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-15 10:46 UTC by Inge Wallin
Modified: 2015-01-15 16:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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