mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3778 Annotations. Move z plane settings to in-view collection
This commit is contained in:
@@ -36,6 +36,9 @@ RimAnnotationInViewCollection::RimAnnotationInViewCollection()
|
||||
|
||||
CAF_PDM_InitField(&m_isActive, "Active", true, "Active", "", "", "");
|
||||
m_isActive.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&m_annotationPlaneDepth, "AnnotationPlaneDepth", 0.0, "Annotation Plane Depth", "", "", "");
|
||||
CAF_PDM_InitField(&m_snapAnnotations, "SnapAnnotations", false, "Snap Annotations to Plane", "", "", "");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -53,6 +56,31 @@ bool RimAnnotationInViewCollection::isActive() const
|
||||
return m_isActive();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimAnnotationInViewCollection::annotationPlaneZ() const
|
||||
{
|
||||
return -m_annotationPlaneDepth();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimAnnotationInViewCollection::snapAnnotations() const
|
||||
{
|
||||
return m_snapAnnotations;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimAnnotationInViewCollection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
uiOrdering.add(&m_annotationPlaneDepth);
|
||||
uiOrdering.add(&m_snapAnnotations);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -61,15 +89,8 @@ void RimAnnotationInViewCollection::fieldChangedByUi(const caf::PdmFieldHandle*
|
||||
if (&m_isActive == changedField)
|
||||
{
|
||||
this->updateUiIconFromToggleField();
|
||||
|
||||
RimGridView* view;
|
||||
firstAncestorOrThisOfType(view);
|
||||
if (view)
|
||||
{
|
||||
//view->hasUserRequestedAnimation = true;
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
scheduleRedrawOfRelevantViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user