Navigation Menu

Skip to content

Commit

Permalink
#8725: fix texts
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuarte47 committed Dec 12, 2013
1 parent 4b794a5 commit 566e5bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsoptions.cpp
Expand Up @@ -525,7 +525,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :

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

// Slightly awkard here at the settings value is true to use QImage,
Expand Down
12 changes: 6 additions & 6 deletions src/core/qgsmaptopixelgeometrysimplifier.cpp
Expand Up @@ -85,18 +85,18 @@ inline static QgsRectangle calculateBoundingBox( QGis::WkbType wkbType, unsigned
memcpy( &x, wkb, sizeof( double ) ); wkb += sizeOfDoubleX;
memcpy( &y, wkb, sizeof( double ) ); wkb += sizeOfDoubleY;

if (xmin>x) xmin = x;
if (ymin>y) ymin = y;
if (xmax<x) xmax = x;
if (ymax<y) ymax = y;
if ( xmin > x ) xmin = x;
if ( ymin > y ) ymin = y;
if ( xmax < x ) xmax = x;
if ( ymax < y ) ymax = y;
}
wkb = wkb2;

return QgsRectangle( xmin, ymin, xmax, ymax );
}

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

0 comments on commit 566e5bd

Please sign in to comment.