#2007 RFT plot. Use central logic for date/time formatting.

This commit is contained in:
Bjørn Erik Jensen 2017-10-16 13:50:57 +02:00
parent 8d96e9e35a
commit 5f39bc5c39

View File

@ -1139,11 +1139,20 @@ void RimWellRftPlot::calculateValueOptionsForTimeSteps(const QString& wellName,
}
}
addTimeStepsToMap(m_timeStepsToAddresses, displayTimeStepsMap);
// Create vector of all time steps
std::vector<QDateTime> allTimeSteps;
for (const auto& timeStepPair : m_timeStepsToAddresses)
{
allTimeSteps.push_back(timeStepPair.first);
}
auto dateFormatString = RimTools::createTimeFormatStringFromDates(allTimeSteps);
for (const auto& timeStepPair : displayTimeStepsMap)
{
options.push_back(caf::PdmOptionItemInfo(timeStepPair.first.toString(RimTools::dateFormatString()), timeStepPair.first));
options.push_back(caf::PdmOptionItemInfo(timeStepPair.first.toString(dateFormatString), timeStepPair.first));
}
addTimeStepsToMap(m_timeStepsToAddresses, displayTimeStepsMap);
}
//--------------------------------------------------------------------------------------------------