mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Use polygon as data source for intersection
- Use polygon as data source for intersection - Add padlock icon - Show padlock icon on read only polygons - Add Fwk function appendMenuItems() to make it possible to define context menu content in a PdmObject - Context menu "Create Polygon Intersection" - Updates to make visualization consistent with object and object collection enabled state
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonTools::selectPolygonInView( RimPolygon* polygon, caf::PdmObject* sourceObject )
|
||||
void RimPolygonTools::selectAndActivatePolygonInView( RimPolygon* polygon, caf::PdmObject* sourceObject )
|
||||
{
|
||||
auto polygonInView = findPolygonInView( polygon, sourceObject );
|
||||
if ( polygonInView )
|
||||
@@ -46,7 +46,12 @@ void RimPolygonTools::selectPolygonInView( RimPolygon* polygon, caf::PdmObject*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPolygonInView* RimPolygonTools::findPolygonInView( RimPolygon* polygon, caf::PdmObject* sourceObject )
|
||||
{
|
||||
if ( auto gridView = sourceObject->firstAncestorOfType<RimGridView>() )
|
||||
if ( !polygon || !sourceObject )
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if ( auto gridView = sourceObject->firstAncestorOrThisOfType<RimGridView>() )
|
||||
{
|
||||
auto polyCollection = gridView->polygonInViewCollection();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user