Skip to content

Commit bda114b

Browse files
committed
#8725: fix texts
1 parent 95cabe5 commit bda114b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/app/qgsoptions.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
562562

563563
// Default simplify drawing configuration
564564
mSimplifyDrawingGroupBox->setChecked( settings.value( "/qgis/simplifyDrawingHints", (int)QgsVectorLayer::DefaultSimplification ).toInt() != QgsVectorLayer::NoSimplification );
565-
mSimplifyDrawingSlider->setValue( (int)(5.0f * (settings.value( "/qgis/simplifyDrawingTol", 1.0F ).toFloat()-1)) );
565+
mSimplifyDrawingSlider->setValue( (int)(5.0f * (settings.value( "/qgis/simplifyDrawingTol", QGis::DEFAULT_MAPTOPIXEL_THRESHOLD ).toFloat()-1)) );
566566
mSimplifyDrawingPanel->setVisible( mSimplifyDrawingSlider->value()>0 );
567567

568568
// Slightly awkard here at the settings value is true to use QImage,

src/core/qgsmaptopixelgeometrysimplifier.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,18 @@ inline static QgsRectangle calculateBoundingBox( QGis::WkbType wkbType, unsigned
8585
memcpy( &x, wkb, sizeof( double ) ); wkb += sizeOfDoubleX;
8686
memcpy( &y, wkb, sizeof( double ) ); wkb += sizeOfDoubleY;
8787

88-
if (xmin>x) xmin = x;
89-
if (ymin>y) ymin = y;
90-
if (xmax<x) xmax = x;
91-
if (ymax<y) ymax = y;
88+
if ( xmin > x ) xmin = x;
89+
if ( ymin > y ) ymin = y;
90+
if ( xmax < x ) xmax = x;
91+
if ( ymax < y ) ymax = y;
9292
}
9393
wkb = wkb2;
9494

9595
return QgsRectangle( xmin, ymin, xmax, ymax );
9696
}
9797

9898
//! Generalize the WKB-geometry using the BBOX of the original geometry
99-
inline static bool generalizeGeometry( QGis::WkbType wkbType, unsigned char* sourceWkb, size_t sourceWkbSize, unsigned char* targetWkb, size_t& targetWkbSize, const QgsRectangle& envelope, bool writeHeader )
99+
inline static bool generalizeWkbGeometry( QGis::WkbType wkbType, unsigned char* sourceWkb, size_t sourceWkbSize, unsigned char* targetWkb, size_t& targetWkbSize, const QgsRectangle& envelope, bool writeHeader )
100100
{
101101
unsigned char* wkb2 = targetWkb;
102102
unsigned int geometryType = QGis::singleType( QGis::flatType( wkbType ) );
@@ -180,7 +180,7 @@ bool QgsMapToPixelSimplifier::simplifyWkbGeometry( int simplifyFlags, QGis::WkbT
180180
// Can replace the geometry by its BBOX ?
181181
if ( ( simplifyFlags & QgsMapToPixelSimplifier::SimplifyEnvelope ) && (envelope.xMaximum()-envelope.xMinimum()) < map2pixelTol && (envelope.yMaximum()-envelope.yMinimum()) < map2pixelTol )
182182
{
183-
canbeGeneralizable = generalizeGeometry( wkbType, sourceWkb, sourceWkbSize, targetWkb, targetWkbSize, envelope, writeHeader );
183+
canbeGeneralizable = generalizeWkbGeometry( wkbType, sourceWkb, sourceWkbSize, targetWkb, targetWkbSize, envelope, writeHeader );
184184
if (canbeGeneralizable) return true;
185185
}
186186
if (!( simplifyFlags & QgsMapToPixelSimplifier::SimplifyGeometry ) ) canbeGeneralizable = false;

0 commit comments

Comments
 (0)