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:
gsherman 2004-06-29 04:31:11 +00:00
parent fd73b222ec
commit 5bc2a5ab7e
2 changed files with 5 additions and 1 deletions

View File

@ -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();
}

View File

@ -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: