Undo system

Cyrille Berger cberger at cberger.net
Thu Mar 8 22:49:56 CET 2007


> - Currently most of the commands are inside an anonymous namespace, so
> that you can only create commands in the class they belong to. With
> the new undo system the classes don't have access to the undoadapter
> anymore and need to be added to the undo stack outside of it.
>
> There are two ways:  Either add methods to KisImage etc. which create
> every command or seperate the commands from the main class.
>
> I prefer the second way as is more flexible. On the other hand it
> would be needed to expose more of the internals.
I vote for the second way ! I don't like much the createSomethingFunction, as 
while the second expose a little bit the internals, the first way is 
crippling the API of KisImage (etc...). And the advantage of flexibility is a 
clear winner. 

> - There isn't a KisCommandHistoryListener at the moment, but it's
> needed for the transform tools. My idea was that KisDoc2 could
> override the addCommand function, but would make the transform tool
> Krita only.
it's not a problem I think, as other application can "transform" the image 
with the flake "handlers", so there is no need to export that tool to other 
application.

-- 
Cyrille Berger


More information about the kimageshop mailing list