mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix regression test crash
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
#include "cvfPrimitiveSetIndexedUInt.h"
|
#include "cvfPrimitiveSetIndexedUInt.h"
|
||||||
#include "cvfRay.h"
|
#include "cvfRay.h"
|
||||||
#include "cvfScalarMapper.h"
|
#include "cvfScalarMapper.h"
|
||||||
|
#include "cvfViewport.h"
|
||||||
#include "cvfqtUtils.h"
|
#include "cvfqtUtils.h"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
@@ -398,7 +399,11 @@ std::vector<cvf::ref<cvf::Drawable>>
|
|||||||
labelBBoxes->clear();
|
labelBBoxes->clear();
|
||||||
labelBBoxes->resize( m_contourLinePolygons.size() );
|
labelBBoxes->resize( m_contourLinePolygons.size() );
|
||||||
|
|
||||||
|
if ( !camera->viewport() || camera->viewport()->width() == 0 ) return labelDrawables;
|
||||||
|
|
||||||
const cvf::ScalarMapper* mapper = m_contourMapProjection->legendConfig()->scalarMapper();
|
const cvf::ScalarMapper* mapper = m_contourMapProjection->legendConfig()->scalarMapper();
|
||||||
|
if ( mapper == nullptr ) return labelDrawables;
|
||||||
|
|
||||||
if ( dynamic_cast<const caf::CategoryMapper*>( mapper ) != nullptr ) return labelDrawables;
|
if ( dynamic_cast<const caf::CategoryMapper*>( mapper ) != nullptr ) return labelDrawables;
|
||||||
|
|
||||||
std::vector<double> tickValues;
|
std::vector<double> tickValues;
|
||||||
|
|||||||
Reference in New Issue
Block a user