mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#577) Delete assosiated link data when view is deleted
When a link master view is deleted, all linked view data is deleted
This commit is contained in:
parent
272c328da3
commit
eb9f909fb1
@ -9,10 +9,11 @@
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimViewController.h"
|
||||
#include "RimOilField.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimViewController.h"
|
||||
#include "RimViewLinker.h"
|
||||
#include "RimViewLinkerCollection.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
@ -121,6 +122,26 @@ RimView::RimView(void)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimView::~RimView(void)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
|
||||
if (proj && this->isMasterView())
|
||||
{
|
||||
delete proj->viewLinkerCollection->viewLinker();
|
||||
proj->viewLinkerCollection->viewLinker = NULL;
|
||||
|
||||
proj->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
RimViewController* vController = this->viewController();
|
||||
if (proj && vController)
|
||||
{
|
||||
vController->setManagedView(NULL);
|
||||
vController->ownerViewLinker()->removeViewController(vController);
|
||||
delete vController;
|
||||
|
||||
proj->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
delete this->m_overlayInfoConfig();
|
||||
|
||||
if (m_viewer)
|
||||
|
Loading…
Reference in New Issue
Block a user