mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#778 Display unit on Y-Axis. Added unit to legend. Cosmetics on Curve Filter Prop-panel
This commit is contained in:
@@ -350,6 +350,19 @@ bool RifReaderEclipseSummary::hasAddress(const RifEclipseSummaryAddress& resultA
|
||||
return (it != m_resultAddressToErtNodeIdx.end());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::string RifReaderEclipseSummary::unitName(const RifEclipseSummaryAddress& resultAddress)
|
||||
{
|
||||
int variableIndex = indexFromAddress(resultAddress);
|
||||
|
||||
if(variableIndex < 0) return "";
|
||||
|
||||
const smspec_node_type * ertSumVarNode = ecl_smspec_iget_node(eclSmSpec, variableIndex);
|
||||
return smspec_node_get_unit(ertSumVarNode);
|
||||
}
|
||||
|
||||
#if 0
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
||||
@@ -48,6 +48,7 @@ public:
|
||||
std::vector<time_t> timeSteps() const;
|
||||
|
||||
bool values(const RifEclipseSummaryAddress& resultAddress, std::vector<double>* values);
|
||||
std::string unitName(const RifEclipseSummaryAddress& resultAddress);
|
||||
|
||||
// TODO: Move this to a tools class with static members
|
||||
static std::vector<QDateTime> fromTimeT(const std::vector<time_t>& timeSteps);
|
||||
|
||||
Reference in New Issue
Block a user