Skip to content
Permalink
Browse files

Fixed #437 - 'one point' errors - in map composer and also in map canvas

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6212 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Dec 8, 2006
1 parent 09bfc8a commit 599456e749e55375e6f651fa8c1ead73cb27a7c5
Showing with 4 additions and 6 deletions.
  1. +1 −1 src/composer/qgscomposermap.cpp
  2. +3 −5 src/gui/qgsmapcanvas.cpp
@@ -294,7 +294,7 @@ void QgsComposerMap::draw ( QPainter & painter )
painter.setBrush( Qt::NoBrush );
painter.save();
painter.translate ( Q3CanvasRectangle::x(), Q3CanvasRectangle::y() );
painter.drawRect ( 0, 0, Q3CanvasRectangle::width()+1, Q3CanvasRectangle::height()+1 ); // is it right?
painter.drawRect ( 0, 0, Q3CanvasRectangle::width(), Q3CanvasRectangle::height() );
painter.restore();
}

@@ -699,13 +699,11 @@ void QgsMapCanvas::resizeEvent(QResizeEvent * e)

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

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

0 comments on commit 599456e

Please sign in to comment.
You can’t perform that action at this time.