mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #4943 from OPM/feature-picking-in-comparison-view-fixes
Picking in comparison view fixes
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimGridView.h"
|
||||
|
||||
#include "MeasurementCommands/RicMeasurementPickEventHandler.h"
|
||||
|
||||
@@ -89,7 +90,7 @@ RimMeasurement::MeasurementMode RimMeasurement::measurementMode() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimMeasurement::addPointInDomainCoords( const Vec3d& domainCoord )
|
||||
{
|
||||
auto activeView = RiaApplication::instance()->activeReservoirView();
|
||||
auto activeView = dynamic_cast<Rim3dView*>( RiaApplication::instance()->activeMainOrComparisonGridView() );
|
||||
|
||||
if ( m_sourceView.p() != activeView )
|
||||
{
|
||||
@@ -194,8 +195,6 @@ RimMeasurement::Lengths RimMeasurement::calculateLenghts() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimMeasurement::updateView() const
|
||||
{
|
||||
if ( m_sourceView )
|
||||
{
|
||||
m_sourceView->updateMeasurement();
|
||||
}
|
||||
Rim3dView* rimView = RiaApplication::instance()->activeReservoirView();
|
||||
rimView->createMeasurementDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
@@ -1027,11 +1027,18 @@ void Rim3dView::updateZScaleLabel()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dView::updateMeasurement()
|
||||
void Rim3dView::createMeasurementDisplayModelAndRedraw()
|
||||
{
|
||||
if ( m_viewer )
|
||||
appendMeasurementToModel();
|
||||
|
||||
if ( Rim3dView* depView = prepareComparisonView() )
|
||||
{
|
||||
depView->appendMeasurementToModel();
|
||||
restoreComparisonView();
|
||||
}
|
||||
|
||||
if ( nativeOrOverrideViewer() )
|
||||
{
|
||||
appendMeasurementToModel();
|
||||
nativeOrOverrideViewer()->update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
void updateAnnotationItems();
|
||||
void updateScaling();
|
||||
void updateZScaleLabel();
|
||||
void updateMeasurement();
|
||||
void createMeasurementDisplayModelAndRedraw();
|
||||
|
||||
bool isMasterView() const;
|
||||
Rim3dView* activeComparisonView() const;
|
||||
|
||||
@@ -198,14 +198,14 @@ void RimIntersectionCollection::recomputeSimWellBranchData()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::appendIntersectionAndUpdate( RimIntersection* intersection )
|
||||
void RimIntersectionCollection::appendIntersectionAndUpdate( RimIntersection* intersection, bool allowActiveViewChange )
|
||||
{
|
||||
m_intersections.push_back( intersection );
|
||||
|
||||
syncronize2dIntersectionViews();
|
||||
|
||||
updateConnectedEditors();
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( intersection );
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( intersection, allowActiveViewChange );
|
||||
|
||||
Rim3dView* rimView = nullptr;
|
||||
firstAncestorOrThisOfType( rimView );
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
|
||||
caf::PdmField<bool> isActive;
|
||||
|
||||
void appendIntersectionAndUpdate( RimIntersection* intersection );
|
||||
void appendIntersectionAndUpdate( RimIntersection* intersection, bool allowActiveViewChange = true );
|
||||
void appendIntersectionNoUpdate( RimIntersection* intersection );
|
||||
|
||||
void appendIntersectionBoxAndUpdate( RimIntersectionBox* intersectionBox );
|
||||
|
||||
Reference in New Issue
Block a user