mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-16 10:22:15 -05:00
#6517 Fudge the maximimum and minimum contour levels inwards
* Unify with logaritmic contour levels. * Ensure the labels in the contour map show less precision. Fudge in the opposite direction and unify with logarithmic
This commit is contained in:
1 parent
f967cfcb65
commit
ec40673119
2 files changed
+18
-16
No files matched your search
@@ -25,10 +25,12 @@
|
||||
#include "cvfPrimitiveSetIndexedUInt.h"
|
||||
#include "cvfRay.h"
|
||||
#include "cvfScalarMapper.h"
|
||||
#include "cvfqtUtils.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QString>
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -267,7 +269,9 @@ std::vector<std::vector<cvf::ref<cvf::Drawable>>>
|
||||
{
|
||||
if ( m_contourLinePolygons[i][j].vertices.empty() ) continue;
|
||||
|
||||
cvf::String labelText( m_contourLinePolygons[i][j].value );
|
||||
// cvf::String::number does not allow precision on 'g' formats, so use Qt.
|
||||
QString qLabelText = QString::number( m_contourLinePolygons[i][j].value, 'g', 2 );
|
||||
cvf::String labelText = cvfqt::Utils::toString( qLabelText );
|
||||
|
||||
size_t nVertices = m_contourLinePolygons[i][j].vertices.size();
|
||||
|
||||
@@ -402,7 +406,9 @@ std::vector<cvf::ref<cvf::Drawable>>
|
||||
{
|
||||
if ( m_contourLinePolygons[i][j].vertices.empty() ) continue;
|
||||
|
||||
cvf::String labelText( m_contourLinePolygons[i][j].value );
|
||||
// cvf::String::number does not allow precision on 'g' formats, so use Qt.
|
||||
QString qLabelText = QString::number( m_contourLinePolygons[i][j].value, 'g', 2 );
|
||||
cvf::String labelText = cvfqt::Utils::toString( qLabelText );
|
||||
|
||||
size_t nVertices = m_contourLinePolygons[i][j].vertices.size();
|
||||
size_t nLabels = nVertices;
|
||||
|
||||
Reference in new issue
Block a user