Skip to content

Commit

Permalink
Define default editor
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Sep 21, 2023
1 parent 27c824c commit 5cc3db0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Fwk/AppFwk/cafUserInterface/cafPdmUiDefaultObjectEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,22 @@ CAF_PDM_UI_REGISTER_DEFAULT_FIELD_EDITOR( PdmUiTreeSelectionEditor, std::vector<

CAF_PDM_UI_REGISTER_DEFAULT_FIELD_EDITOR( PdmUiFilePathEditor, FilePath );

// As the macro CAF_PDM_UI_REGISTER_DEFAULT_FIELD_EDITOR() is not working correctly for std::pair<bool, double> the
// As the macro CAF_PDM_UI_REGISTER_DEFAULT_FIELD_EDITOR() is not working correctly for std::pair<> the
// registration of this type in the factory has to be written directly
static bool myPdmUiCheckBoxAndTextEditor73 =
static bool myPdmUiCheckBoxAndTextEditor =
caf::Factory<caf::PdmUiFieldEditorHandle, QString>::instance()->registerCreator<PdmUiCheckBoxAndTextEditor>(
QString( typeid( caf::PdmField<std::pair<bool, double>> ).name() ) );
static bool my2PdmUiCheckBoxAndTextEditor73 =
static bool myPdmUiCheckBoxAndTextEditor_proxy =
caf::Factory<caf::PdmUiFieldEditorHandle, QString>::instance()->registerCreator<PdmUiCheckBoxAndTextEditor>(
QString( typeid( caf::PdmProxyValueField<std::pair<bool, double>> ).name() ) );

static bool myPdmUiValueRangeEditor =
caf::Factory<caf::PdmUiFieldEditorHandle, QString>::instance()->registerCreator<PdmUiValueRangeEditor>(
QString( typeid( caf::PdmField<std::pair<double, double>> ).name() ) );
static bool myPdmUiValueRangeEditor_proxy =
caf::Factory<caf::PdmUiFieldEditorHandle, QString>::instance()->registerCreator<PdmUiValueRangeEditor>(
QString( typeid( caf::PdmProxyValueField<std::pair<double, double>> ).name() ) );

//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 5cc3db0

Please sign in to comment.