mirror of
https://github.com/OPM/ResInsight.git
synced 2024-12-29 10:21:54 -06:00
Make sure project tree is updated when view is deleted
This commit is contained in:
parent
2d688b1c8b
commit
85136fb343
@ -24,6 +24,7 @@
|
|||||||
#include "RigCaseCellResultsData.h"
|
#include "RigCaseCellResultsData.h"
|
||||||
|
|
||||||
#include "Rim3dView.h"
|
#include "Rim3dView.h"
|
||||||
|
#include "RimCase.h"
|
||||||
#include "RimCellEdgeColors.h"
|
#include "RimCellEdgeColors.h"
|
||||||
#include "RimEclipseCellColors.h"
|
#include "RimEclipseCellColors.h"
|
||||||
#include "RimEclipseView.h"
|
#include "RimEclipseView.h"
|
||||||
@ -61,6 +62,18 @@ std::vector<RimEclipseView*> RimEclipseViewCollection::views() const
|
|||||||
return m_views.childrenByType();
|
return m_views.childrenByType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimEclipseViewCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||||
|
{
|
||||||
|
// If a view is child of a case, the view collection object is hidden in the tree view. Find the parent case and update connected editors.
|
||||||
|
if ( auto parentCase = firstAncestorOrThisOfType<RimCase>() )
|
||||||
|
{
|
||||||
|
parentCase->updateConnectedEditors();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -44,6 +44,9 @@ public:
|
|||||||
|
|
||||||
std::vector<RimEclipseView*> views() const;
|
std::vector<RimEclipseView*> views() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray, std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmChildArrayField<RimEclipseView*> m_views;
|
caf::PdmChildArrayField<RimEclipseView*> m_views;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user