mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Allow linking of contour map views
* Place copy of contour map in correct collection * Allow linking of contour maps * Improve handling of contour views and 3D views * Guard nullptr * Guard assert seen on Linux * Zoom all on contour map when unlinked to reset zoom If a contour map is linked to a 3D view, the view can get distorted. Call ZoomAll to reset to sensible defaults. * Remove default rainbow legend
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "RicDeleteAllLinkedViewsFeature.h"
|
||||
|
||||
#include "RimEclipseContourMapView.h"
|
||||
#include "RimGridView.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimViewLinker.h"
|
||||
@@ -75,10 +76,16 @@ void RicDeleteAllLinkedViewsFeature::onActionTriggered( bool isChecked )
|
||||
// viewLinkerCollection->viewLinker is a PdmChildField containing one RimViewLinker child object
|
||||
proj->viewLinkerCollection->viewLinker.removeChild( viewLinker );
|
||||
|
||||
viewLinker->applyCellFilterCollectionByUserChoice();
|
||||
auto views = viewLinker->allViews();
|
||||
|
||||
viewLinker->applyCellFilterCollectionByUserChoice();
|
||||
delete viewLinker;
|
||||
|
||||
for ( auto v : views )
|
||||
{
|
||||
if ( dynamic_cast<RimEclipseContourMapView*>( v ) ) v->zoomAll();
|
||||
}
|
||||
|
||||
proj->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user