mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#497) Moved per cell filter code from property filter to result definition
This commit is contained in:
@@ -109,32 +109,6 @@ void RimEclipsePropertyFilter::fieldChangedByUi(const caf::PdmFieldHandle* chang
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Property filter can handle only one value per cell. Remove option items that has more than
|
||||
/// one value per cell
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipsePropertyFilter::removePerCellFaceOptionItems(QList<caf::PdmOptionItemInfo>& optionItems)
|
||||
{
|
||||
std::vector<int> indicesToRemove;
|
||||
for (int i = 0; i < optionItems.size(); i++)
|
||||
{
|
||||
QString text = optionItems[i].optionUiText;
|
||||
|
||||
if (RimDefines::isPerCellFaceResult(text))
|
||||
{
|
||||
indicesToRemove.push_back(i);
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(indicesToRemove.begin(), indicesToRemove.end());
|
||||
|
||||
std::vector<int>::reverse_iterator rit;
|
||||
for (rit = indicesToRemove.rbegin(); rit != indicesToRemove.rend(); ++rit)
|
||||
{
|
||||
optionItems.takeAt(*rit);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user