Skip to content

Commit b182a5e

Browse files

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed
 

‎src/core/composer/qgsnumericscalebarstyle.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void QgsNumericScaleBarStyle::draw( QPainter* p, double xOffset ) const
5050
p->save();
5151
p->setFont( mScaleBar->font() );
5252

53-
mScaleBar->drawText( p, mScaleBar->pen().widthF() + mScaleBar->boxContentSpace(), mScaleBar->boxContentSpace() + mScaleBar->fontAscentMM( mScaleBar->font() ), scaleText(), mScaleBar->font() );
53+
mScaleBar->drawText( p, mScaleBar->pen().widthF() + mScaleBar->boxContentSpace(), mScaleBar->boxContentSpace() + mScaleBar->fontAscentMillimeters( mScaleBar->font() ), scaleText(), mScaleBar->font() );
5454

5555
p->restore();
5656
}
@@ -63,8 +63,8 @@ QRectF QgsNumericScaleBarStyle::calculateBoxSize() const
6363
return rect;
6464
}
6565

66-
double textWidth = mScaleBar->textWidthMM( mScaleBar->font(), scaleText() );
67-
double textHeight = mScaleBar->fontAscentMM( mScaleBar->font() );
66+
double textWidth = mScaleBar->textWidthMillimeters( mScaleBar->font(), scaleText() );
67+
double textHeight = mScaleBar->fontAscentMillimeters( mScaleBar->font() );
6868

6969
return QRectF( mScaleBar->transform().dx(), mScaleBar->transform().dy(), 2 * mScaleBar->boxContentSpace()
7070
+ 2 * mScaleBar->pen().width() + textWidth,

‎src/core/qgsproject.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,6 @@ bool QgsProject::write()
10251025
"may be corrupted on disk. Try clearing some space on the volume and "
10261026
"check file permissions before pressing save again." ) +
10271027
imp_->file.fileName() );
1028-
return false;
10291028
}
10301029

10311030
dirty( false ); // reset to pristine state

‎src/core/qgsvectorlayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2426,7 +2426,7 @@ bool QgsVectorLayer::readSymbology( const QDomNode& node, QString& errorMessage
24262426
QDomNode uniquevaluenode = node.namedItem( "uniquevalue" );
24272427

24282428
QgsRenderer * renderer = 0;
2429-
int returnCode;
2429+
int returnCode = 1;
24302430

24312431
if ( !singlenode.isNull() )
24322432
{

0 commit comments

Comments
 (0)
Please sign in to comment.