mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#641) Use checkable button for point input from viewer
This commit is contained in:
@@ -89,15 +89,17 @@ bool RicNewPolylineCrossSectionFeature::handleUiEvent(cvf::Object* uiEventObject
|
||||
if (polylineUiEvent)
|
||||
{
|
||||
RimCrossSection* crossSection = selection[0];
|
||||
if (crossSection->inputFromViewerEnabled())
|
||||
{
|
||||
RimCase* rimCase = NULL;
|
||||
crossSection->firstAnchestorOrThisOfType(rimCase);
|
||||
CVF_ASSERT(rimCase);
|
||||
|
||||
RimCase* rimCase = NULL;
|
||||
crossSection->firstAnchestorOrThisOfType(rimCase);
|
||||
CVF_ASSERT(rimCase);
|
||||
crossSection->appendPointToPolyLine(rimCase->displayModelOffset() + polylineUiEvent->localIntersectionPoint);
|
||||
|
||||
crossSection->appendPointToPolyLine(rimCase->displayModelOffset() + polylineUiEvent->localIntersectionPoint);
|
||||
|
||||
// Further Ui processing is stopped when true is returned
|
||||
return true;
|
||||
// Further Ui processing is stopped when true is returned
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,9 +140,9 @@ void RicNewPolylineCrossSectionFeatureCmd::redo()
|
||||
RimCrossSection* crossSection = new RimCrossSection();
|
||||
crossSection->name = "Polyline";
|
||||
crossSection->type = RimCrossSection::CS_POLYLINE;
|
||||
m_crossSectionCollection->appendCrossSection(crossSection);
|
||||
crossSection->inputFromViewerEnabled = true;
|
||||
|
||||
crossSection->updateActiveUiCommandFeature();
|
||||
m_crossSectionCollection->appendCrossSection(crossSection);
|
||||
|
||||
RiuSelectionManager::instance()->deleteAllItems();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user