You either call KoTextEditor->beginEditBlock before doing all the operations (ie, before deleting the shape and the anchor), and call textEditor->endEditBlock(),<div>or alternatively you create a KUndo2Command and call KoTextEditor->addCommand(yourCommand). I think the second method is better as it allows you to specify the name of the command appearing in the undo stack. (check in the textTool/commands for some examples.</div>
<div><br></div><div>PierreSt<br><br><div class="gmail_quote">On Thu, Jan 5, 2012 at 4:27 AM, Thorsten Zachmann <span dir="ltr"><<a href="mailto:t.zachmann@zagge.de">t.zachmann@zagge.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Wednesday, January 04, 2012 11:55:14 Boudewijn Rempt wrote:<br>
> On Thursday 15 December 2011 Dec, Boudewijn Rempt wrote:<br>
> > It turns out that currently, only the rdf system keeps the actual id<br>
> > strings after loading is finished, the other parts of calligra only<br>
> > use the id strings to build their mappings during loading, and<br>
> > recreate them during saving.<br>
><br>
> Turns out that this isn't correct. The changetracking system also keeps a<br>
> map, so I'll have to create the a class that keeps the map, can update<br>
> items and a listener interface that can be used to make sure all<br>
> dependent objects are informed when the xml-id is regenerated during a<br>
> save operation.<br>
><br>
> This should in all likelihood improve the rdf code as well.<br>
<br>
</div>Can you please point me to the place where you see this.<br>
<br>
The only place where I found it is the KoGenChanges. If that is the place you<br>
talk about then it is not needed to have a mapping as that is only used on<br>
saving.<br>
<span class="HOEnZb"><font color="#888888"><br>
Thorsten<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
calligra-devel mailing list<br>
<a href="mailto:calligra-devel@kde.org">calligra-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/calligra-devel" target="_blank">https://mail.kde.org/mailman/listinfo/calligra-devel</a><br>
</div></div></blockquote></div><br></div>