mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1761 Use eclipse case directory as default path when selecting SourSim file
This commit is contained in:
parent
93502706be
commit
e6fda31255
@ -532,6 +532,7 @@ void RimEclipseResultCase::defineEditorAttribute(const caf::PdmFieldHandle* fiel
|
|||||||
if (myAttr)
|
if (myAttr)
|
||||||
{
|
{
|
||||||
myAttr->m_fileSelectionFilter = "SourSim (*.sourres)";
|
myAttr->m_fileSelectionFilter = "SourSim (*.sourres)";
|
||||||
|
myAttr->m_defaultPath = QFileInfo(caseFileName()).absolutePath();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,14 @@ void PdmUiFilePathEditor::fileSelectionClicked()
|
|||||||
QString defaultPath;
|
QString defaultPath;
|
||||||
if ( m_lineEdit->text().isEmpty())
|
if ( m_lineEdit->text().isEmpty())
|
||||||
{
|
{
|
||||||
defaultPath = QDir::homePath();
|
if (m_attributes.m_defaultPath.isNull())
|
||||||
|
{
|
||||||
|
defaultPath = QDir::homePath();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
defaultPath = m_attributes.m_defaultPath;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -61,6 +61,7 @@ public:
|
|||||||
m_selectSaveFileName = false;
|
m_selectSaveFileName = false;
|
||||||
m_fileSelectionFilter = "All files (*.* *)";
|
m_fileSelectionFilter = "All files (*.* *)";
|
||||||
|
|
||||||
|
m_defaultPath = QString();
|
||||||
m_selectDirectory = false;
|
m_selectDirectory = false;
|
||||||
m_appendUiSelectedFolderToText = false;
|
m_appendUiSelectedFolderToText = false;
|
||||||
m_multipleItemSeparator = ';';
|
m_multipleItemSeparator = ';';
|
||||||
@ -69,6 +70,7 @@ public:
|
|||||||
bool m_selectSaveFileName;
|
bool m_selectSaveFileName;
|
||||||
QString m_fileSelectionFilter;
|
QString m_fileSelectionFilter;
|
||||||
|
|
||||||
|
QString m_defaultPath;
|
||||||
bool m_selectDirectory;
|
bool m_selectDirectory;
|
||||||
bool m_appendUiSelectedFolderToText;
|
bool m_appendUiSelectedFolderToText;
|
||||||
QChar m_multipleItemSeparator;
|
QChar m_multipleItemSeparator;
|
||||||
|
Loading…
Reference in New Issue
Block a user