undo of selection

Casper Boemann cbr at boemann.dk
Thu Apr 14 23:06:01 CEST 2005


On Thursday 14 April 2005 22:57, Boudewijn Rempt wrote:
> On Thu, 14 Apr 2005, Casper Boemann wrote:
> > Hi again
> >
> > The way selections are now created and removed on the fly gives us
> > problems with undo.
> >
> > When a selection is removed the undo info is also obsoleted.
> >
> > In my mind we need to have a single KisSelection for the lifetime of the
> > owning paintdevice (though created the first time it's referenced). Clear
> > should modify the selection not delete it.
>
> I think you're right. I'm not sure whether this is a change we can do
> before the release, but it might be rather easy because most times a
> selection is created through KisPaintDevice::selection().
Well it's clearly a bug fix 
I think I'll hack away on this one

> > Alternatively, all transactions that delete a selection should not
> > actually delete it, but  only remove it and store it in a subclass of
> > KisTransaction)
> I don't think that solution is as nice as the other one.
No I don't like it either. If for no other reason that currently the delete 
might be done by code that knows nothing of the transaction, so doing this 
solution would be kind of hard.

> However, we should 
> keep in mind the possibility that in the future we might want more than one
> selection per paint device.
I'll keep that in mind, though not code for it.

-- 
best regards / venlig hilsen
Casper Boemann


More information about the kimageshop mailing list