mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
(#632) Add Eclipse cell to selection and show in 3D view and time history plot
Consolidated remove of model based on name in RimView Cleanup selection and time history plot when project is closed
This commit is contained in:
@@ -746,3 +746,23 @@ void RimView::replaceRangeFilterCollectionWithOverride()
|
||||
this->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimView::removeModelByName(cvf::Scene* scene, const cvf::String& modelName)
|
||||
{
|
||||
std::vector<cvf::Model*> modelsToBeRemoved;
|
||||
for (cvf::uint i = 0; i < scene->modelCount(); i++)
|
||||
{
|
||||
if (scene->model(i)->name() == modelName)
|
||||
{
|
||||
modelsToBeRemoved.push_back(scene->model(i));
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < modelsToBeRemoved.size(); i++)
|
||||
{
|
||||
scene->removeModel(modelsToBeRemoved[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user