mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-13 01:26:19 -06: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:
1 parent
963220dd37
commit
7cd2cd0f50
10 files changed
+150
-47
No files matched your search
@@ -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