Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ void RicTextAnnotation3dEditor::configureAndUpdateUi( const QString& uiConfigNam
RiuViewer* ownerRiuViewer = dynamic_cast<RiuViewer*>( ownerViewer() );
Rim3dView* view = mainOrComparisonView();

if ( !textAnnot || !textAnnot->isActive() || !view )
if ( !textAnnot || !textAnnot->isActive() || !view || textAnnot->m_anchorPointXyd().isUndefined() ||
textAnnot->m_labelPointXyd().isUndefined() )
{
if ( m_cvfModel.notNull() ) m_cvfModel->removeAllParts();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void RivReachCircleAnnotationPartMgr::appendDynamicGeometryPartsToModel( cvf::Mo
bool RivReachCircleAnnotationPartMgr::validateAnnotation( const RimReachCircleAnnotation* annotation ) const
{
auto a = m_rimAnnotationInView->sourceAnnotation();
return a->centerPoint() != cvf::Vec3d::ZERO && a->radius() > 0.0;
return !a->centerPoint().isUndefined() && a->radius() > 0.0;
}

//--------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void RivTextAnnotationPartMgr::appendDynamicGeometryPartsToModel( cvf::ModelBasi
//--------------------------------------------------------------------------------------------------
bool RivTextAnnotationPartMgr::validateAnnotation( const RimTextAnnotation* annotation ) const
{
return rimAnnotation()->anchorPoint() != cvf::Vec3d::ZERO && !rimAnnotation()->text().isEmpty();
return !rimAnnotation()->anchorPoint().isUndefined() && !rimAnnotation()->text().isEmpty();
}

//--------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RimReachCircleAnnotation::RimReachCircleAnnotation()
nameField()->registerKeywordAlias( "Name" );
setName( "Circle Annotation" );

CAF_PDM_InitField( &m_centerPointXyd, "CenterPointXyd", Vec3d::ZERO, "Center Point" );
CAF_PDM_InitField( &m_centerPointXyd, "CenterPointXyd", Vec3d::UNDEFINED, "Center Point" );
m_centerPointXyd.uiCapability()->setUiEditorTypeName( caf::PdmUiPickableLineEditor::uiEditorTypeName() );
CAF_PDM_InitField( &m_centerPointPickEnabled, "AnchorPointPick", false, "" );
caf::PdmUiPushButtonEditor::configureEditorLabelHidden( &m_centerPointPickEnabled );
Expand Down Expand Up @@ -162,7 +162,7 @@ void RimReachCircleAnnotation::defineEditorAttribute( const caf::PdmFieldHandle*
{
attr->pickEventHandler = m_centerPointEventHandler;
attr->enablePicking = m_centerPointPickEnabled;
if ( m_centerPointXyd().isZero() )
if ( m_centerPointXyd().isUndefined() )
{
attr->enablePicking = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ RimTextAnnotation::RimTextAnnotation()
CAF_PDM_InitScriptableObject( "TextAnnotation", ":/TextAnnotation16x16.png" );
setUi3dEditorTypeName( RicTextAnnotation3dEditor::uiEditorTypeName() );

CAF_PDM_InitField( &m_anchorPointXyd, "AnchorPointXyd", Vec3d::ZERO, "Anchor Point" );
CAF_PDM_InitField( &m_anchorPointXyd, "AnchorPointXyd", Vec3d::UNDEFINED, "Anchor Point" );
m_anchorPointXyd.uiCapability()->setUiEditorTypeName( caf::PdmUiPickableLineEditor::uiEditorTypeName() );
CAF_PDM_InitField( &m_anchorPointPickEnabledButtonField, "AnchorPointPick", false, "" );
caf::PdmUiPushButtonEditor::configureEditorLabelHidden( &m_anchorPointPickEnabledButtonField );

CAF_PDM_InitField( &m_labelPointXyd, "LabelPointXyd", Vec3d::ZERO, "Label Point" );
CAF_PDM_InitField( &m_labelPointXyd, "LabelPointXyd", Vec3d::UNDEFINED, "Label Point" );
m_labelPointXyd.uiCapability()->setUiEditorTypeName( caf::PdmUiPickableLineEditor::uiEditorTypeName() );
CAF_PDM_InitField( &m_labelPointPickEnabledButtonField, "LabelPointPick", false, "" );
caf::PdmUiPushButtonEditor::configureEditorLabelHidden( &m_labelPointPickEnabledButtonField );
Expand Down Expand Up @@ -166,7 +166,7 @@ void RimTextAnnotation::fieldChangedByUi( const caf::PdmFieldHandle* changedFiel
if ( changedField == &m_anchorPointXyd )
{
m_anchorPointPickEnabledButtonField = false;
if ( m_labelPointXyd().isZero() )
if ( m_labelPointXyd().isUndefined() )
{
m_labelPointXyd = m_anchorPointXyd;
}
Expand Down