diff --git a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafAppEnumField.h b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafAppEnumField.h index 523493b4ac..412bded6aa 100644 --- a/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafAppEnumField.h +++ b/Fwk/AppFwk/cafProjectDataModel/cafPdmCore/cafAppEnumField.h @@ -24,7 +24,7 @@ public: QVariant toQVariant() const override { - auto enumValue = static_cast>( m_fieldValue ); + auto enumValue = static_cast>( m_fieldValue.value() ); return enumValue; } diff --git a/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp b/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp index 3e0bdee720..dbd0aa404a 100644 --- a/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp +++ b/Fwk/AppFwk/cafTests/cafTestApplication/MainWindow.cpp @@ -18,6 +18,7 @@ #include "cafCmdSelectionHelper.h" #endif +#include "cafAppEnumField.h" #include "cafCmdFeatureMenuBuilder.h" #include "cafFilePath.h" #include "cafPdmDocument.h" @@ -714,6 +715,8 @@ public: "", "", "" ); + + CAF_PDM_InitFieldNoDefault( &m_testAppEnumField, "TestAppEnumValue", "AppEnum Field" ); CAF_PDM_InitFieldNoDefault( &m_ptrField, "m_ptrField", "PtrField", "", "", "" ); CAF_PDM_InitFieldNoDefault( &m_proxyEnumField, "ProxyEnumValue", "ProxyEnum", "", "", "" ); @@ -732,6 +735,7 @@ public: caf::PdmField m_intField; caf::PdmField m_textField; caf::PdmField> m_testEnumField; + caf::AppEnumField m_testAppEnumField; caf::PdmPtrField m_ptrField; caf::PdmProxyValueField> m_proxyEnumField;