mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-05 00:09:32 -04:00
Fixed overview extent rectangle bug that incorrectly displayed the zoom rectangle
as drawn rather than the actual view extent of the map canvas after rendering git-svn-id: http://svn.osgeo.org/qgis/trunk@1701 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
fd73b222ec
commit
5bc2a5ab7e
@ -2697,7 +2697,9 @@ void QgisApp::showExtents(QgsRect theExtents)
|
||||
// add it to the acetate layer
|
||||
mOverviewCanvas->addAcetateObject("extent", acRect);
|
||||
// refresh the overview map
|
||||
#ifdef QGISDEBUG
|
||||
std::cerr << "Adding extent to acetate layer" << std::endl;
|
||||
#endif
|
||||
mOverviewCanvas->refresh();
|
||||
}
|
||||
|
||||
|
@ -585,8 +585,10 @@ void QgsMapCanvas::currentScale(int thePrecision)
|
||||
}
|
||||
QgsRect paddedExtent(dxmin, dymin, dxmax, dymax);
|
||||
mCanvasProperties->mScale = mCanvasProperties->scaleCalculator->calculate(paddedExtent, width());
|
||||
#ifdef QGISDEBUG
|
||||
std::cout << "Scale (assuming meters as map units) = 1:"
|
||||
<< mCanvasProperties->mScale << std::endl;
|
||||
#endif
|
||||
// return scale based on geographic
|
||||
//
|
||||
|
||||
@ -787,9 +789,9 @@ void QgsMapCanvas::mouseReleaseEvent(QMouseEvent * e)
|
||||
mCanvasProperties->currentExtent.setXmax(ur.x());
|
||||
mCanvasProperties->currentExtent.setYmax(ur.y());
|
||||
mCanvasProperties->currentExtent.normalize();
|
||||
emit extentsChanged(mCanvasProperties->currentExtent);
|
||||
clear();
|
||||
render();
|
||||
emit extentsChanged(mCanvasProperties->currentExtent);
|
||||
|
||||
break;
|
||||
case QGis::ZoomOut:
|
||||
|
Loading…
x
Reference in New Issue
Block a user