mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 23:23:01 -06:00
#903 Fixed formation names file name presentation in UI. Use filename wo/path
This commit is contained in:
parent
58a25c9fe9
commit
a9509c0212
@ -78,7 +78,7 @@ QList<caf::PdmOptionItemInfo> RimCase::calculateValueOptions(const caf::PdmField
|
|||||||
{
|
{
|
||||||
for(RimFormationNames* fnames : proj->activeOilField()->formationNamesCollection()->formationNamesList())
|
for(RimFormationNames* fnames : proj->activeOilField()->formationNamesCollection()->formationNamesList())
|
||||||
{
|
{
|
||||||
optionList.push_back(caf::PdmOptionItemInfo(fnames->uiCapability()->uiName(),
|
optionList.push_back(caf::PdmOptionItemInfo(fnames->fileNameWoPath(),
|
||||||
QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(fnames)),
|
QVariant::fromValue(caf::PdmPointer<caf::PdmObjectHandle>(fnames)),
|
||||||
false,
|
false,
|
||||||
fnames->uiCapability()->uiIcon()));
|
fnames->uiCapability()->uiIcon()));
|
||||||
|
@ -25,7 +25,9 @@
|
|||||||
#include "RimView.h"
|
#include "RimView.h"
|
||||||
|
|
||||||
#include "cafPdmUiFilePathEditor.h"
|
#include "cafPdmUiFilePathEditor.h"
|
||||||
#include "QFile"
|
|
||||||
|
#include <QFile>
|
||||||
|
#include <QFileInfo>
|
||||||
|
|
||||||
CAF_PDM_SOURCE_INIT(RimFormationNames, "FormationNames");
|
CAF_PDM_SOURCE_INIT(RimFormationNames, "FormationNames");
|
||||||
|
|
||||||
@ -76,7 +78,7 @@ void RimFormationNames::initAfterRead()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimFormationNames::updateUiTreeName()
|
void RimFormationNames::updateUiTreeName()
|
||||||
{
|
{
|
||||||
this->uiCapability()->setUiName(m_formationNamesFileName());
|
this->uiCapability()->setUiName(fileNameWoPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -97,6 +99,15 @@ const QString& RimFormationNames::fileName()
|
|||||||
return m_formationNamesFileName();
|
return m_formationNamesFileName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RimFormationNames::fileNameWoPath()
|
||||||
|
{
|
||||||
|
QFileInfo fnameFileInfo(m_formationNamesFileName());
|
||||||
|
return fnameFileInfo.fileName();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -33,6 +33,7 @@ public:
|
|||||||
|
|
||||||
void setFileName(const QString& fileName);
|
void setFileName(const QString& fileName);
|
||||||
const QString& fileName();
|
const QString& fileName();
|
||||||
|
QString fileNameWoPath();
|
||||||
|
|
||||||
RigFormationNames* formationNamesData() { return m_formationNamesData.p();}
|
RigFormationNames* formationNamesData() { return m_formationNamesData.p();}
|
||||||
void updateConnectedViews();
|
void updateConnectedViews();
|
||||||
|
Loading…
Reference in New Issue
Block a user