Skip to content

Commit e68fb10

Browse files
committed
update test, misc fixes, add another value to array
1 parent 317f9fc commit e68fb10

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

src/app/3d/qgspointcloud3dsymbolwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ Qgis::PointCloudZoomOutRenderBehavior QgsPointCloud3DSymbolWidget::zoomOutBehavi
712712

713713
void QgsPointCloud3DSymbolWidget::setZoomOutMultiplier( double multiplier )
714714
{
715-
int idx = 0;
715+
size_t idx = 0;
716716
for ( size_t i = 0; i < mZoomOutScale.size(); ++i )
717717
{
718718
if ( multiplier <= mZoomOutScale[i] )

src/app/3d/qgspointcloud3dsymbolwidget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class QgsPointCloud3DSymbolWidget : public QWidget, private Ui::QgsPointCloud3DS
8080
void setColorRampMinMax( double min, double max );
8181

8282
private:
83-
const std::array<double, 7> mZoomOutScale = { 0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0 };
83+
const std::array<double, 8> mZoomOutScale = { 0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 16.0 };
8484

8585
int mBlockChangedSignals = 0;
8686
int mDisableMinMaxWidgetRefresh = 0;

src/gui/pointcloud/qgspointcloudrendererpropertieswidget.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ void QgsPointCloudRendererPropertiesWidget::syncToLayer( QgsMapLayer *layer )
227227

228228
mMaxErrorSpinBox->setValue( mLayer->renderer()->maximumScreenError() );
229229
mMaxErrorUnitWidget->setUnit( mLayer->renderer()->maximumScreenErrorUnit() );
230-
mZoomOutMultiplier->setValue( mLayer->renderer()->zoomOutMultiplier() );
230+
setZoomOutMultiplier( mLayer->renderer()->zoomOutMultiplier() );
231231

232232
mTriangulateGroupBox->setChecked( mLayer->renderer()->renderAsTriangles() );
233233
mHorizontalTriangleCheckBox->setChecked( mLayer->renderer()->horizontalTriangleFilter() );
@@ -373,12 +373,12 @@ void QgsPointCloudRendererPropertiesWidget::emitWidgetChanged()
373373
emit widgetChanged();
374374
}
375375

376-
void QgsPointCloudRendererPropertiesWidget::setZoomOutMultiplier( double threshold )
376+
void QgsPointCloudRendererPropertiesWidget::setZoomOutMultiplier( double multiplier )
377377
{
378-
int idx = 0;
378+
size_t idx = 0;
379379
for ( size_t i = 0; i < mZoomOutScale.size(); ++i )
380380
{
381-
if ( threshold <= mZoomOutScale[i] )
381+
if ( multiplier <= mZoomOutScale[i] )
382382
{
383383
idx = i;
384384
break;

src/gui/pointcloud/qgspointcloudrendererpropertieswidget.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ class GUI_EXPORT QgsPointCloudRendererPropertiesWidget : public QgsMapLayerConfi
6565

6666
private:
6767
static void initRendererWidgetFunctions();
68-
void setZoomOutMultiplier( double threshold );
68+
void setZoomOutMultiplier( double multiplier );
6969
double zoomOutMultiplier() const;
7070

71-
const std::array<double, 7> mZoomOutScale = { 0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0 };
71+
const std::array<double, 8> mZoomOutScale = { 0.125, 0.25, 0.5, 1.0, 2.0, 4.0, 8.0, 16.0 };
7272

7373
QgsPointCloudLayer *mLayer = nullptr;
7474
QgsStyle *mStyle = nullptr;

tests/src/3d/testqgspointcloud3drendering.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ void TestQgsPointCloud3DRendering::testPointCloud3DOverview()
603603
QgsPointCloudLayer3DRenderer *renderer = new QgsPointCloudLayer3DRenderer();
604604
renderer->setSymbol( symbol );
605605
renderer->setZoomOutBehavior( Qgis::PointCloudZoomOutRenderBehavior::RenderOverview );
606+
renderer->setZoomOutMultiplier( 16.0 );
606607
mVpcLayer->setRenderer3D( renderer );
607608

608609
scene->cameraController()->resetView( 120 );

0 commit comments

Comments
 (0)