#1972 Toggle grid collection off when creating an intersection

This commit is contained in:
Rebecca Cox
2017-11-08 15:10:32 +01:00
parent b8ec896464
commit 52c1f27ad2
2 changed files with 10 additions and 7 deletions

View File

@@ -21,6 +21,7 @@
#include "RimIntersection.h"
#include "RimIntersectionCollection.h"
#include "RimView.h"
#include "cafCmdExecCommandManager.h"
#include "cafSelectionManager.h"
@@ -100,6 +101,12 @@ void RicAppendIntersectionFeatureCmd::redo()
RimIntersection* intersection = new RimIntersection();
intersection->name = QString("Intersection");
m_intersectionCollection->appendIntersection(intersection);
RimView* view = nullptr;
m_intersectionCollection->firstAncestorOrThisOfTypeAsserted(view);
//Enable display of grid cells, to be able to show generated property filter
view->showGridCells(false);
}
//--------------------------------------------------------------------------------------------------

View File

@@ -63,13 +63,9 @@ void RicAppendIntersectionBoxFeature::onActionTriggered(bool isChecked)
coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
RimView* rimView = NULL;
coll->firstAncestorOrThisOfType(rimView);
if (rimView)
{
rimView->showGridCells(false);
rimView->scheduleCreateDisplayModelAndRedraw();
}
RimView* rimView = nullptr;
coll->firstAncestorOrThisOfTypeAsserted(rimView);
rimView->showGridCells(false);
}
}