diff --git a/widgets/glWidget/QtBaseViewer.cc b/widgets/glWidget/QtBaseViewer.cc index b2976515c4f41b6fe359314b47d035ff5ccc869d..f22b4ed88efa8c2f5a30d668652d50f3ab6fe2d8 100644 --- a/widgets/glWidget/QtBaseViewer.cc +++ b/widgets/glWidget/QtBaseViewer.cc @@ -2222,14 +2222,9 @@ void glViewer::snapshot( int _width, int _height, bool _alpha ) QString fname = fi.path() + QDir::separator() +fi.baseName() + "." + QString::number(properties_.snapshotCounter()) + "."; - QString format="png"; + fname += properties_.snapshotFileType(); - if (fi.completeSuffix() == "ppm") - format="ppmraw"; - - fname += format; - - bool rval=image.save(fname,format.toUpper().toLatin1()); + bool rval=image.save(fname,properties_.snapshotFileType().toUpper().toLatin1()); if (rval) {