mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
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
This commit is contained in:
parent
09bfc8aa0f
commit
599456e749
@ -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));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user