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:
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "RimPolygonInViewCollection.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimPolygon.h"
|
||||
#include "RimPolygonCollection.h"
|
||||
#include "RimPolygonInView.h"
|
||||
@@ -83,3 +84,24 @@ std::vector<RimPolygonInView*> RimPolygonInViewCollection::polygonsInView() cons
|
||||
{
|
||||
return m_polygons.childrenByType();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
RimCheckableObject::fieldChangedByUi( changedField, oldValue, newValue );
|
||||
|
||||
if ( changedField == &m_isChecked )
|
||||
{
|
||||
for ( auto poly : polygonsInView() )
|
||||
{
|
||||
poly->updateConnectedEditors();
|
||||
}
|
||||
|
||||
if ( auto view = firstAncestorOfType<Rim3dView>() )
|
||||
{
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user