From e2369996e262eee82e2a8222fdaec18366adef36 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 31 Dec 2015 17:04:56 +0100 Subject: [PATCH] if offscreen rendering for thumbnail fails then only write out application icon --- src/Gui/Thumbnail.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Gui/Thumbnail.cpp b/src/Gui/Thumbnail.cpp index a3e26f0e7..034715d5c 100644 --- a/src/Gui/Thumbnail.cpp +++ b/src/Gui/Thumbnail.cpp @@ -101,10 +101,11 @@ void Thumbnail::SaveDocFile (Base::Writer &writer) const } } - if (!img.isNull()) { - QPixmap px = Gui::BitmapFactory().pixmap(App::Application::Config()["AppIcon"].c_str()); + QPixmap px = Gui::BitmapFactory().pixmap(App::Application::Config()["AppIcon"].c_str()); + if (!img.isNull()) px = BitmapFactory().merge(QPixmap::fromImage(img),px,BitmapFactoryInst::BottomRight); + if (!px.isNull()) { // according to specification add some meta-information to the image uint mt = QDateTime::currentDateTime().toTime_t(); QString mtime = QString::fromAscii("%1").arg(mt);