#4857 RicNewPolylineIntersectionFeature, RicNewAzimuthDipIntersectionFeature, RicIntersectionBoxAtPosFeature

This commit is contained in:
Jacob Støren 2019-10-17 16:39:24 +02:00
parent 03987a5f71
commit b785969d68
4 changed files with 12 additions and 16 deletions

View File

@ -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 );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -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 );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -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 ); RiuMainWindow::instance()->refreshDrawStyleActions();
if ( rimView )
{
rimView->showGridCells( false );
RiuMainWindow::instance()->refreshDrawStyleActions();
rimView->scheduleCreateDisplayModelAndRedraw(); activeView->scheduleCreateDisplayModelAndRedraw();
}
} }
} }

View File

@ -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 );