mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4857 RicNewPolylineIntersectionFeature, RicNewAzimuthDipIntersectionFeature, RicIntersectionBoxAtPosFeature
This commit is contained in:
parent
03987a5f71
commit
b785969d68
@ -58,7 +58,7 @@ bool RicNewAzimuthDipIntersectionFeature::isCommandEnabled()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicNewAzimuthDipIntersectionFeature::onActionTriggered( bool isChecked )
|
void RicNewAzimuthDipIntersectionFeature::onActionTriggered( bool isChecked )
|
||||||
{
|
{
|
||||||
RimGridView* activeView = RiaApplication::instance()->activeGridView();
|
RimGridView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView();
|
||||||
if ( !activeView ) return;
|
if ( !activeView ) return;
|
||||||
|
|
||||||
RicNewAzimuthDipIntersectionFeatureCmd* cmd = new RicNewAzimuthDipIntersectionFeatureCmd(
|
RicNewAzimuthDipIntersectionFeatureCmd* cmd = new RicNewAzimuthDipIntersectionFeatureCmd(
|
||||||
@ -122,7 +122,7 @@ void RicNewAzimuthDipIntersectionFeatureCmd::redo()
|
|||||||
m_intersectionCollection->appendIntersectionAndUpdate( intersection );
|
m_intersectionCollection->appendIntersectionAndUpdate( intersection );
|
||||||
|
|
||||||
Riu3dSelectionManager::instance()->deleteAllItems();
|
Riu3dSelectionManager::instance()->deleteAllItems();
|
||||||
Riu3DMainWindowTools::selectAsCurrentItem( intersection );
|
Riu3DMainWindowTools::selectAsCurrentItem( intersection, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -57,7 +57,7 @@ bool RicNewPolylineIntersectionFeature::isCommandEnabled()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicNewPolylineIntersectionFeature::onActionTriggered( bool isChecked )
|
void RicNewPolylineIntersectionFeature::onActionTriggered( bool isChecked )
|
||||||
{
|
{
|
||||||
RimGridView* activeView = RiaApplication::instance()->activeGridView();
|
RimGridView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView();
|
||||||
if ( !activeView ) return;
|
if ( !activeView ) return;
|
||||||
|
|
||||||
RicNewPolylineIntersectionFeatureCmd* cmd = new RicNewPolylineIntersectionFeatureCmd(
|
RicNewPolylineIntersectionFeatureCmd* cmd = new RicNewPolylineIntersectionFeatureCmd(
|
||||||
@ -112,7 +112,7 @@ void RicNewPolylineIntersectionFeatureCmd::redo()
|
|||||||
|
|
||||||
Riu3dSelectionManager::instance()->deleteAllItems();
|
Riu3dSelectionManager::instance()->deleteAllItems();
|
||||||
|
|
||||||
Riu3DMainWindowTools::selectAsCurrentItem( intersection );
|
Riu3DMainWindowTools::selectAsCurrentItem( intersection, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -52,9 +52,10 @@ bool RicIntersectionBoxAtPosFeature::isCommandEnabled()
|
|||||||
void RicIntersectionBoxAtPosFeature::onActionTriggered( bool isChecked )
|
void RicIntersectionBoxAtPosFeature::onActionTriggered( bool isChecked )
|
||||||
{
|
{
|
||||||
RimGridView* activeView = RiaApplication::instance()->activeGridView();
|
RimGridView* activeView = RiaApplication::instance()->activeGridView();
|
||||||
if ( activeView )
|
RimGridView* activeMainOrComparisonView = RiaApplication::instance()->activeMainOrComparisonGridView();
|
||||||
|
if ( activeMainOrComparisonView )
|
||||||
{
|
{
|
||||||
RimIntersectionCollection* coll = activeView->crossSectionCollection();
|
RimIntersectionCollection* coll = activeMainOrComparisonView->crossSectionCollection();
|
||||||
CVF_ASSERT( coll );
|
CVF_ASSERT( coll );
|
||||||
|
|
||||||
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
|
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
|
||||||
@ -67,17 +68,12 @@ void RicIntersectionBoxAtPosFeature::onActionTriggered( bool isChecked )
|
|||||||
intersectionBox->setToDefaultSizeSlice( RimIntersectionBox::PLANE_STATE_NONE, domainCoord );
|
intersectionBox->setToDefaultSizeSlice( RimIntersectionBox::PLANE_STATE_NONE, domainCoord );
|
||||||
|
|
||||||
coll->updateConnectedEditors();
|
coll->updateConnectedEditors();
|
||||||
RiuMainWindow::instance()->selectAsCurrentItem( intersectionBox );
|
RiuMainWindow::instance()->selectAsCurrentItem( intersectionBox, false );
|
||||||
|
|
||||||
RimGridView* rimView = nullptr;
|
activeMainOrComparisonView->showGridCells(false);
|
||||||
coll->firstAncestorOrThisOfType( rimView );
|
|
||||||
if ( rimView )
|
|
||||||
{
|
|
||||||
rimView->showGridCells( false );
|
|
||||||
RiuMainWindow::instance()->refreshDrawStyleActions();
|
RiuMainWindow::instance()->refreshDrawStyleActions();
|
||||||
|
|
||||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
activeView->scheduleCreateDisplayModelAndRedraw();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ void RimIntersectionCollection::appendIntersectionBoxAndUpdate( RimIntersectionB
|
|||||||
m_intersectionBoxes.push_back( intersectionBox );
|
m_intersectionBoxes.push_back( intersectionBox );
|
||||||
|
|
||||||
updateConnectedEditors();
|
updateConnectedEditors();
|
||||||
Riu3DMainWindowTools::selectAsCurrentItem( intersectionBox );
|
Riu3DMainWindowTools::selectAsCurrentItem( intersectionBox, false );
|
||||||
|
|
||||||
Rim3dView* rimView = nullptr;
|
Rim3dView* rimView = nullptr;
|
||||||
firstAncestorOrThisOfType( rimView );
|
firstAncestorOrThisOfType( rimView );
|
||||||
|
Loading…
Reference in New Issue
Block a user