Skip to content

Commit

Permalink
if offscreen rendering for thumbnail fails then only write out applic…
Browse files Browse the repository at this point in the history
…ation icon
  • Loading branch information
wwmayer committed Dec 31, 2015
1 parent 5e0f2ae commit e236999
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Gui/Thumbnail.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit e236999

Please sign in to comment.