Patch: don't save tiles that are equal to the default tile

Cyrille Berger cberger at cberger.net
Tue Mar 16 15:23:16 CET 2010


On Tuesday 16 March 2010, Dmitry Kazakov wrote:
> On Tue, Mar 16, 2010 at 4:33 PM, Boudewijn Rempt <boud at valdyas.org> wrote:
> > On Tue, 16 Mar 2010, Dmitry Kazakov wrote:
> > > I don't think we need this.
> > > 
> > > KisTileHashTableIterator returns the number of non-default tiles, or
> > 
> > (more
> > 
> > > precisely) the number of preallocated tiles. After you fixed the
> > > extents bug, these terms coincide. So this check is superfluous.
> > 
> > Isn't it so that within a rectangle of allocated tiles there can be
> > unallocated, default pixel, tiles?
> 
> What do you mean? Which rectangle? extents?
> If they are unallocated, they are not returned by the iterator. If they are
> allocated, but empty (store default value), this is some subtle bug of the
> calling code, i guess. This can happen if we use non-const iterator for
> reading, or if we just direct copy data from empty device, but this is
> quite rare case, i think.
I think it happened to me after a call to clearSelection, that can happen 
either by calling edit->clear, or edit->cut. It can also happen after the use 
of the eraser tool.

-- 
Cyrille Berger


More information about the kimageshop mailing list