diff --git a/ApplicationCode/ProjectDataModel/RimWellPathCompletion.cpp b/ApplicationCode/ProjectDataModel/RimWellPathCompletion.cpp index 4ba3abc570..3bba18e062 100644 --- a/ApplicationCode/ProjectDataModel/RimWellPathCompletion.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellPathCompletion.cpp @@ -22,6 +22,7 @@ #include "RimProject.h" #include "cafPdmUiListEditor.h" +#include "cafPdmUiTextEditor.h" CAF_PDM_SOURCE_INIT(RimWellPathCompletion, "WellPathCompletion"); @@ -40,6 +41,7 @@ RimWellPathCompletion::RimWellPathCompletion() CAF_PDM_InitFieldNoDefault(&m_displayCoordinates, "DisplayCoordinates", "Coordinates", "", "", ""); m_displayCoordinates.registerGetMethod(this, &RimWellPathCompletion::displayCoordinates); m_displayCoordinates.uiCapability()->setUiReadOnly(true); + m_displayCoordinates.uiCapability()->setUiEditorTypeName(caf::PdmUiTextEditor::uiEditorTypeName()); } @@ -88,19 +90,19 @@ void RimWellPathCompletion::defineUiOrdering(QString uiConfigName, caf::PdmUiOrd //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -std::vector RimWellPathCompletion::displayCoordinates() const +QString RimWellPathCompletion::displayCoordinates() const { CVF_ASSERT(m_coordinates().size() == m_measuredDepths().size()); - std::vector displayValues; + QStringList displayValues; displayValues.push_back(QString("X\tY\tZ\tMD")); for (size_t i = 0; i < m_coordinates().size(); i++) { const cvf::Vec3d& coords = m_coordinates()[i]; const double& measuredDepth = m_measuredDepths()[i]; - displayValues.push_back(QString("%1\t%2\t%3\t%4\t").arg(coords.x()).arg(coords.y()).arg(coords.z()).arg(measuredDepth)); + displayValues.push_back(QString("%1\t%2\t%3\t%4").arg(coords.x()).arg(coords.y()).arg(coords.z()).arg(measuredDepth)); } - return displayValues; + return displayValues.join("\n"); } diff --git a/ApplicationCode/ProjectDataModel/RimWellPathCompletion.h b/ApplicationCode/ProjectDataModel/RimWellPathCompletion.h index 38309cfeb4..73abd53b72 100644 --- a/ApplicationCode/ProjectDataModel/RimWellPathCompletion.h +++ b/ApplicationCode/ProjectDataModel/RimWellPathCompletion.h @@ -58,9 +58,9 @@ public: std::vector< cvf::Vec3d > coordinates() { return m_coordinates(); } std::vector< double > measuredDepths() { return m_measuredDepths(); } private: - std::vector displayCoordinates() const; + QString displayCoordinates() const; caf::PdmField< std::vector< cvf::Vec3d> > m_coordinates; caf::PdmField< std::vector< double > > m_measuredDepths; - caf::PdmProxyValueField< std::vector > m_displayCoordinates; + caf::PdmProxyValueField< QString > m_displayCoordinates; };