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);
|
||||
}
|
||||
|
||||
{
|
||||
QString fallbackFolderName = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath("snapshots");
|
||||
QString folderName =
|
||||
RiaApplication::instance()->lastUsedDialogDirectoryWithFallback("ADVANCED_SNAPSHOT_EXPORT", fallbackFolderName);
|
||||
dlg.setExportFolder(folderName);
|
||||
}
|
||||
|
||||
dlg.exec();
|
||||
|
||||
RiaApplication::instance()->setLastUsedDialogDirectory("ADVANCED_SNAPSHOT_EXPORT", dlg.exportFolder());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -93,10 +93,7 @@ RiuAdvancedSnapshotExportWidget::RiuAdvancedSnapshotExportWidget(QWidget* parent
|
||||
|
||||
layout->addWidget(new QLabel("Export folder"));
|
||||
|
||||
// Save images in snapshot catalog relative to project directory
|
||||
QString snapshotFolderName = RiaApplication::instance()->createAbsolutePathFromProjectRelativePath("snapshots");
|
||||
|
||||
m_exportFolderLineEdit = new QLineEdit(snapshotFolderName);
|
||||
m_exportFolderLineEdit = new QLineEdit;
|
||||
|
||||
QToolButton* button = new QToolButton;
|
||||
button->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred));
|
||||
@ -187,6 +184,22 @@ void RiuAdvancedSnapshotExportWidget::addEmptySnapshotItems(size_t itemCount)
|
||||
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 addEmptySnapshotItems(size_t itemCount);
|
||||
void setExportFolder(const QString& folder);
|
||||
QString exportFolder() const;
|
||||
|
||||
private slots:
|
||||
void customMenuRequested(QPoint pos);
|
||||
|
Loading…
Reference in New Issue
Block a user