mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#539) When view is unlinked, ask user to keep either override or original range filter collection
This commit is contained in:
@@ -42,11 +42,17 @@ bool RicDeleteAllLinkedViewsFeature::isCommandEnabled()
|
||||
void RicDeleteAllLinkedViewsFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
if (proj->viewLinkerCollection()->viewLinker())
|
||||
{
|
||||
delete proj->viewLinkerCollection()->viewLinker();
|
||||
|
||||
proj->viewLinkerCollection()->viewLinker = NULL;
|
||||
RimViewLinker* viewLinker = proj->viewLinkerCollection()->viewLinker();
|
||||
if (viewLinker)
|
||||
{
|
||||
// Remove the view linker object from the view linker collection
|
||||
// viewLinkerCollection->viewLinker is a PdmChildField containing one RimViewLinker child object
|
||||
proj->viewLinkerCollection->viewLinker.removeChildObject(viewLinker);
|
||||
|
||||
viewLinker->applyRangeFilterCollectionByUserChoice();
|
||||
|
||||
delete viewLinker;
|
||||
|
||||
proj->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user