GuiImage: detaching the QImage does not have any good side effect apparently. It just results in some jumps of memory because the QImage data is referenced somewhere else (I don't know where as only the transformed image should be on screen).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26456 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-09-19 11:42:53 +00:00
parent 31c1982677
commit 482468dda6

View File

@ -90,7 +90,6 @@ bool GuiImage::load()
LYXERR(Debug::GRAPHICS, "Unable to open image");
return false;
}
original_.detach();
return true;
}
@ -110,13 +109,10 @@ bool GuiImage::setPixmap(Params const & params)
is_transformed_ |= scale(params);
// Clear the pixmap to save some memory.
if (is_transformed_) {
original_.detach();
if (is_transformed_)
original_ = QImage();
} else {
transformed_.detach();
else
transformed_ = QImage();
}
return true;
}