#5704 Show Plot Data : Increase precision to 8

This commit is contained in:
Magne Sjaastad 2020-03-19 16:02:37 +01:00
parent a828ccdfe4
commit 73dabc323d
2 changed files with 9 additions and 2 deletions

View File

@ -2260,7 +2260,7 @@ void appendToExportDataForCase( QString& out, const std::vector<time_t>& timeSte
QString valueText; QString valueText;
if ( j < curveData[k].values.size() ) if ( j < curveData[k].values.size() )
{ {
valueText = QString::number( curveData[k].values[j], 'g', 6 ); valueText = QString::number( curveData[k].values[j], 'g', RimSummaryPlot::precision() );
} }
out += "\t" + valueText.rightJustified( 13 ); out += "\t" + valueText.rightJustified( 13 );
} }
@ -2377,7 +2377,8 @@ void appendToExportData( QString& out, const std::vector<CurvesData>& curvesData
QString valueText; QString valueText;
if ( timeStepExists ) if ( timeStepExists )
{ {
valueText = QString::number( data.allCurveData[i][j].values[currIndex], 'g', 6 ); valueText =
QString::number( data.allCurveData[i][j].values[currIndex], 'g', RimSummaryPlot::precision() );
} }
else else
{ {

View File

@ -169,6 +169,12 @@ public:
void onAxisSelected( int axis, bool toggle ) override; void onAxisSelected( int axis, bool toggle ) override;
static constexpr int precision()
{
// Set precision to 8, as this is the precision used in summary data in libEcl
return 8;
}
public: public:
// RimViewWindow overrides // RimViewWindow overrides
void deleteViewWidget() override; void deleteViewWidget() override;