#2331 Save the 2D Intersection views. Turn off unneccesary fields

This commit is contained in:
Jacob Støren 2018-01-29 11:24:53 +01:00
parent a5dd38969f
commit 6dead054c4
4 changed files with 21 additions and 6 deletions

View File

@ -35,7 +35,7 @@
#include <QDateTime> #include <QDateTime>
CAF_PDM_XML_ABSTRACT_SOURCE_INIT(Rim2dIntersectionView, "Intersection2dView"); CAF_PDM_SOURCE_INIT(Rim2dIntersectionView, "Intersection2dView");
const cvf::Mat4d defaultIntersectinoViewMatrix(1, 0, 0, 0, const cvf::Mat4d defaultIntersectinoViewMatrix(1, 0, 0, 0,
0, 0, 1, 0, 0, 0, 1, 0,
@ -55,11 +55,13 @@ Rim2dIntersectionView::Rim2dIntersectionView(void)
m_showWindow = false; m_showWindow = false;
m_scaleTransform = new cvf::Transform(); m_scaleTransform = new cvf::Transform();
m_intersectionVizModel = new cvf::ModelBasicList; m_intersectionVizModel = new cvf::ModelBasicList;
hasUserRequestedAnimation = true; hasUserRequestedAnimation = true;
isPerspectiveView = false;
((RiuViewerToViewInterface*)this)->setCameraPosition(defaultIntersectinoViewMatrix ); ((RiuViewerToViewInterface*)this)->setCameraPosition(defaultIntersectinoViewMatrix );
disableGridBox();
disableGridBoxField();
disablePerspectiveProjectionField();
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -257,6 +259,7 @@ void Rim2dIntersectionView::createDisplayModel()
if ( this->hasUserRequestedAnimation() ) if ( this->hasUserRequestedAnimation() )
{ {
m_viewer->setCurrentFrame(m_currentTimeStep); m_viewer->setCurrentFrame(m_currentTimeStep);
updateCurrentTimeStep();
} }
if ( this->viewer()->mainCamera()->viewMatrix() == defaultIntersectinoViewMatrix ) if ( this->viewer()->mainCamera()->viewMatrix() == defaultIntersectinoViewMatrix )

View File

@ -863,9 +863,21 @@ void Rim3dView::forceShowWindowOn()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void Rim3dView::disableGridBox() void Rim3dView::disableGridBoxField()
{ {
m_showGridBox = false; m_showGridBox = false;
m_showGridBox.uiCapability()->setUiHidden(true);
m_showGridBox.xmlCapability()->setIOWritable(false);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dView::disablePerspectiveProjectionField()
{
isPerspectiveView = false;
isPerspectiveView.uiCapability()->setUiHidden(true);
isPerspectiveView.xmlCapability()->setIOWritable(false);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -148,7 +148,8 @@ public:
protected: protected:
virtual void setDefaultView(); virtual void setDefaultView();
void disableGridBox(); void disableGridBoxField();
void disablePerspectiveProjectionField();
RimWellPathCollection* wellPathCollection(); RimWellPathCollection* wellPathCollection();
void addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList, void addWellPathsToModel(cvf::ModelBasicList* wellPathModelBasicList,

View File

@ -55,7 +55,6 @@ RimCase::RimCase() : m_isInActiveDestruction(false)
CAF_PDM_InitFieldNoDefault(&m_2dIntersectionViewCollection, "IntersectionViewCollection", "2D Intersection Views", ":/CrossSections16x16.png", "", ""); CAF_PDM_InitFieldNoDefault(&m_2dIntersectionViewCollection, "IntersectionViewCollection", "2D Intersection Views", ":/CrossSections16x16.png", "", "");
m_2dIntersectionViewCollection.uiCapability()->setUiTreeHidden(true); m_2dIntersectionViewCollection.uiCapability()->setUiTreeHidden(true);
m_2dIntersectionViewCollection.xmlCapability()->setIOWritable(false); // Temporarily until something of value are present.
m_2dIntersectionViewCollection = new Rim2dIntersectionViewCollection(); m_2dIntersectionViewCollection = new Rim2dIntersectionViewCollection();
} }