Added pref option to disable the FreeCAD logo in the FCStd file thumbnail

This commit is contained in:
Yorik van Havre
2017-06-16 00:25:42 -03:00
parent 07fd41f4fc
commit d28bae3f52
3 changed files with 27 additions and 4 deletions

View File

@@ -106,8 +106,13 @@ void Thumbnail::SaveDocFile (Base::Writer &writer) const
}
QPixmap px = Gui::BitmapFactory().pixmap(App::Application::Config()["AppIcon"].c_str());
if (!img.isNull())
px = BitmapFactory().merge(QPixmap::fromImage(img),px,BitmapFactoryInst::BottomRight);
if (!img.isNull()) {
if (App::GetApplication().GetParameterGroupByPath
("User parameter:BaseApp/Preferences/Document")->GetBool("AddThumbnailLogo",true))
px = BitmapFactory().merge(QPixmap::fromImage(img),px,BitmapFactoryInst::BottomRight);
else
px = QPixmap::fromImage(img);
}
if (!px.isNull()) {
// according to specification add some meta-information to the image