(#119) Improved naming of Property Filters

Finalized.
This commit is contained in:
Jacob Støren
2015-07-02 12:49:28 +02:00
parent bfdc00edaf
commit 1a3a2f1ff5
8 changed files with 60 additions and 6 deletions

View File

@@ -28,6 +28,7 @@
#include "cafPdmUiDoubleSliderEditor.h"
#include "cvfAssert.h"
#include "cvfMath.h"
#include "RiuMainWindow.h"
namespace caf
@@ -110,6 +111,7 @@ void RimEclipsePropertyFilter::fieldChangedByUi(const caf::PdmFieldHandle* chang
resultDefinition->fieldChangedByUi(changedField, oldValue, newValue);
setToDefaultValues();
m_parentContainer->fieldChangedByUi(changedField, oldValue, newValue);
updateFilterName();
}
if ( &lowerBound == changedField
@@ -119,6 +121,7 @@ void RimEclipsePropertyFilter::fieldChangedByUi(const caf::PdmFieldHandle* chang
|| &filterMode == changedField)
{
m_parentContainer->fieldChangedByUi(changedField, oldValue, newValue);
updateFilterName();
this->updateIconState();
}
}
@@ -255,3 +258,15 @@ void RimEclipsePropertyFilter::computeResultValueRange()
upperBound.setUiName(QString("Max (%1)").arg(max));
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimEclipsePropertyFilter::updateFilterName()
{
QString newFiltername;
newFiltername = resultDefinition->resultVariable() + " ("
+ QString::number(lowerBound()) + " .. " + QString::number(upperBound) + ")";
this->name = newFiltername;
RiuMainWindow::instance()->forceProjectTreeRepaint();
}