mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4441 Advanced snapshot export : Remember output path between multiple sessions
This commit is contained in:
parent
df2fe42c4a
commit
464f3b9d83
@ -87,7 +87,16 @@ void RicAdvancedSnapshotExportFeature::onActionTriggered(bool isChecked)
|
|||||||
dlg.addEmptySnapshotItems(4);
|
dlg.addEmptySnapshotItems(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
QString fallbackFolderName = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath("snapshots");
|
||||||
|
QString folderName =
|
||||||
|
RiaApplication::instance()->lastUsedDialogDirectoryWithFallback("ADVANCED_SNAPSHOT_EXPORT", fallbackFolderName);
|
||||||
|
dlg.setExportFolder(folderName);
|
||||||
|
}
|
||||||
|
|
||||||
dlg.exec();
|
dlg.exec();
|
||||||
|
|
||||||
|
RiaApplication::instance()->setLastUsedDialogDirectory("ADVANCED_SNAPSHOT_EXPORT", dlg.exportFolder());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,10 +93,7 @@ RiuAdvancedSnapshotExportWidget::RiuAdvancedSnapshotExportWidget(QWidget* parent
|
|||||||
|
|
||||||
layout->addWidget(new QLabel("Export folder"));
|
layout->addWidget(new QLabel("Export folder"));
|
||||||
|
|
||||||
// Save images in snapshot catalog relative to project directory
|
m_exportFolderLineEdit = new QLineEdit;
|
||||||
QString snapshotFolderName = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath("snapshots");
|
|
||||||
|
|
||||||
m_exportFolderLineEdit = new QLineEdit(snapshotFolderName);
|
|
||||||
|
|
||||||
QToolButton* button = new QToolButton;
|
QToolButton* button = new QToolButton;
|
||||||
button->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred));
|
button->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred));
|
||||||
@ -187,6 +184,22 @@ void RiuAdvancedSnapshotExportWidget::addEmptySnapshotItems(size_t itemCount)
|
|||||||
m_rimProject->multiSnapshotDefinitions.uiCapability()->updateConnectedEditors();
|
m_rimProject->multiSnapshotDefinitions.uiCapability()->updateConnectedEditors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RiuAdvancedSnapshotExportWidget::setExportFolder(const QString& folder)
|
||||||
|
{
|
||||||
|
m_exportFolderLineEdit->setText(folder);
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RiuAdvancedSnapshotExportWidget::exportFolder() const
|
||||||
|
{
|
||||||
|
return m_exportFolderLineEdit->text();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -38,6 +38,8 @@ public:
|
|||||||
|
|
||||||
void addSnapshotItemFromActiveView();
|
void addSnapshotItemFromActiveView();
|
||||||
void addEmptySnapshotItems(size_t itemCount);
|
void addEmptySnapshotItems(size_t itemCount);
|
||||||
|
void setExportFolder(const QString& folder);
|
||||||
|
QString exportFolder() const;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void customMenuRequested(QPoint pos);
|
void customMenuRequested(QPoint pos);
|
||||||
|
Loading…
Reference in New Issue
Block a user