Fix LayerImage::getMemSize

Now it doesn't count more than once the memory used by the layer's cels
This commit is contained in:
Martín Capello 2024-10-16 11:31:08 -03:00
parent 9560650867
commit 6f9b10f9fb

View File

@ -253,10 +253,11 @@ int LayerImage::getMemSize() const
for (; it != end; ++it) {
const Cel* cel = *it;
size += cel->getMemSize();
const Image* image = cel->image();
size += image->getMemSize();
if (cel->link()) // Skip link
continue;
size += cel->getMemSize();
}
return size;