Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
@@ -1055,14 +1055,16 @@ bool G4OpenGLViewer::setExportFilename(G4String name,G4bool inc) {
} else {
// guess format by extention
std::string extension = name.substr(name.find_last_of(".") + 1);
// no format
if (name.size() != extension.size()) {
if (! setExportImageFormat(extension, false)) {
// If there is a dot in the name the above might find rubbish, so...
if (extension.size() >= 3 && extension.size() <= 4) { // Possible extension
if (setExportImageFormat(extension, false)) { // Extension found
fExportFilename = name.substr(0,name.find_last_of("."));
} else { // No viable extension found
return false;
}
} else { // Assume name is already the required without-extension part
fExportFilename = name;
}
// get the name
fExportFilename = name.substr(0,name.find_last_of("."));
}
return true;
}