Skip to content

Commit f81e8af

Browse files
author
wonder
committedDec 8, 2006
Fixed #437 - 'one point' errors - in map composer and also in map canvas
git-svn-id: http://svn.osgeo.org/qgis/trunk@6212 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 493e742 commit f81e8af

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed
 

‎src/composer/qgscomposermap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ void QgsComposerMap::draw ( QPainter & painter )
294294
painter.setBrush( Qt::NoBrush );
295295
painter.save();
296296
painter.translate ( Q3CanvasRectangle::x(), Q3CanvasRectangle::y() );
297-
painter.drawRect ( 0, 0, Q3CanvasRectangle::width()+1, Q3CanvasRectangle::height()+1 ); // is it right?
297+
painter.drawRect ( 0, 0, Q3CanvasRectangle::width(), Q3CanvasRectangle::height() );
298298
painter.restore();
299299
}
300300

‎src/gui/qgsmapcanvas.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -699,13 +699,11 @@ void QgsMapCanvas::resizeEvent(QResizeEvent * e)
699699

700700
// Adjust the size (in pixels) of that we draw by the margins in
701701
// the widget that the drawing eventually gets placed in. In my testing
702-
// the margin was 2 pixels on each border. Add 1 more pixel just to
703-
// be sure that the drawn map appears fully within the margins in
704-
// the widget.
702+
// the margin was 2 pixels on each border.
705703
int top, bottom, right, left;
706704
getContentsMargins(&left, &top, &right, &bottom);
707-
width = width - (left + right + 1);
708-
height = height - (top + bottom + 1);
705+
width = width - (left + right);
706+
height = height - (top + bottom);
709707

710708
mMap->resize(/*e->size()*/ QSize(width,height));
711709

0 commit comments

Comments
 (0)