mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#552 Linked Views : Prototype - show label at cursor position in dependant views
This commit is contained in:
@@ -67,6 +67,7 @@ RimViewController::RimViewController(void)
|
||||
m_managedView.uiCapability()->setUiTreeChildrenHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&m_syncCamera, "SyncCamera", true, "Camera", "", "", "");
|
||||
CAF_PDM_InitField(&m_showCursor, "ShowCursor", false, " Show Cursor", "", "", "");
|
||||
CAF_PDM_InitField(&m_syncTimeStep, "SyncTimeStep", true, "Time Step", "", "", "");
|
||||
CAF_PDM_InitField(&m_syncCellResult, "SyncCellResult", false, "Cell Result", "", "", "");
|
||||
CAF_PDM_InitField(&m_syncLegendDefinitions, "SyncLegendDefinitions", true, " Legend Definition", "", "", "");
|
||||
@@ -174,6 +175,13 @@ void RimViewController::fieldChangedByUi(const caf::PdmFieldHandle* changedField
|
||||
{
|
||||
updateTimeStepLink();
|
||||
}
|
||||
else if (changedField == &m_showCursor)
|
||||
{
|
||||
if (!m_showCursor && m_managedView && m_managedView->viewer())
|
||||
{
|
||||
m_managedView->viewer()->setCursorPosition(cvf::Vec3d::UNDEFINED);
|
||||
}
|
||||
}
|
||||
else if (changedField == &m_syncCellResult)
|
||||
{
|
||||
updateResultColorsControl();
|
||||
@@ -418,6 +426,16 @@ void RimViewController::updateOptionSensitivity()
|
||||
this->m_syncRangeFilters = false;
|
||||
}
|
||||
|
||||
if (m_syncCamera)
|
||||
{
|
||||
this->m_showCursor.uiCapability()->setUiReadOnly(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->m_showCursor.uiCapability()->setUiReadOnly(true);
|
||||
this->m_showCursor = false;
|
||||
}
|
||||
|
||||
m_syncVisibleCells.uiCapability()->setUiReadOnly(!this->isMasterAndDepViewDifferentType());
|
||||
}
|
||||
|
||||
@@ -455,6 +473,7 @@ void RimViewController::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderin
|
||||
caf::PdmUiGroup* scriptGroup = uiOrdering.addNewGroup("Link Options");
|
||||
|
||||
scriptGroup->add(&m_syncCamera);
|
||||
scriptGroup->add(&m_showCursor);
|
||||
scriptGroup->add(&m_syncTimeStep);
|
||||
scriptGroup->add(&m_syncCellResult);
|
||||
scriptGroup->add(&m_syncLegendDefinitions);
|
||||
@@ -713,6 +732,14 @@ bool RimViewController::isCameraLinked()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimViewController::showCursor() const
|
||||
{
|
||||
return m_showCursor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user