mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixed crash in multi snapshots to file
This commit is contained in:
parent
442d9d2e41
commit
e679b551c9
@ -208,7 +208,16 @@ void RicSnapshotAllPlotsToFileFeature::exportSnapshotOfAllPlotsIntoFolder(QStrin
|
|||||||
{
|
{
|
||||||
if (viewWindow->isMdiWindow() && viewWindow->viewWidget())
|
if (viewWindow->isMdiWindow() && viewWindow->viewWidget())
|
||||||
{
|
{
|
||||||
QString fileName = viewWindow->userDescriptionField()->uiCapability()->uiValue().toString();
|
QString fileName;
|
||||||
|
if ( viewWindow->userDescriptionField())
|
||||||
|
{
|
||||||
|
fileName = viewWindow->userDescriptionField()->uiCapability()->uiValue().toString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fileName = viewWindow->uiCapability()->uiName();
|
||||||
|
}
|
||||||
|
|
||||||
fileName = caf::Utils::makeValidFileBasename(fileName);
|
fileName = caf::Utils::makeValidFileBasename(fileName);
|
||||||
|
|
||||||
QString absoluteFileName = caf::Utils::constructFullFileName(absSnapshotPath, fileName, ".png");
|
QString absoluteFileName = caf::Utils::constructFullFileName(absSnapshotPath, fileName, ".png");
|
||||||
|
Loading…
Reference in New Issue
Block a user