mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Support linking of 2D intersection views
* Major refactor from RimGridView to Rim3dView * Move view linker/controller functions to Rim3dView * Add bitmask to define the content of a 3D view * Link views based on matching content * Enable bit mask operators at global scope * Make it possible to use 2d intersection views as comparison views * Fix crash when a view used as comparison view is deleted * Move unlinking to Rim3dView * Add options to snapshot only 3D views/plots as part of regression testing * WBS plot: Improve default name, hide axis for some tracks
This commit is contained in:
@@ -49,7 +49,7 @@ RimGridView* gridViewFrom2dIntersectionView( const Rim2dIntersectionView* int2dV
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSelectColorResult::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
actionToSetup->setText( "Select Color Result" );
|
||||
actionToSetup->setText( "Activate Result in Project Tree" );
|
||||
actionToSetup->setIcon( QIcon( ":/CellResult.png" ) );
|
||||
}
|
||||
|
||||
@@ -68,8 +68,7 @@ bool RicSelectColorResult::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSelectColorResult::onActionTriggered( bool isChecked )
|
||||
{
|
||||
Rim3dView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView();
|
||||
bool isComparisonView = ( activeView != RiaApplication::instance()->activeGridView() );
|
||||
Rim3dView* activeView = RiaApplication::instance()->activeReservoirView();
|
||||
|
||||
Rim2dIntersectionView* int2dView = dynamic_cast<Rim2dIntersectionView*>( activeView );
|
||||
RimGridView* gridView = nullptr;
|
||||
@@ -82,13 +81,13 @@ void RicSelectColorResult::onActionTriggered( bool isChecked )
|
||||
RimEclipseView* eclView = dynamic_cast<RimEclipseView*>( gridView );
|
||||
if ( eclView )
|
||||
{
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( eclView->cellResult(), int2dView == nullptr && !isComparisonView );
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( eclView->cellResult(), int2dView == nullptr );
|
||||
return;
|
||||
}
|
||||
|
||||
RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>( gridView );
|
||||
if ( geoMechView )
|
||||
{
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( geoMechView->cellResult(), int2dView == nullptr && !isComparisonView );
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( geoMechView->cellResult(), int2dView == nullptr );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user