mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Fixed Partial map displayed after window resize bug [882424 ]
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@875 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
07d60883ad
commit
d471367572
@ -191,7 +191,9 @@ void QgsMapCanvas::refresh()
|
|||||||
void QgsMapCanvas::render2()
|
void QgsMapCanvas::render2()
|
||||||
{
|
{
|
||||||
QString msg = frozen ? "frozen" : "thawed";
|
QString msg = frozen ? "frozen" : "thawed";
|
||||||
//std::cout << "Map canvas is " << msg << std::endl;
|
#ifdef QGISDEBUG
|
||||||
|
std::cout << "Map canvas is " << msg << std::endl;
|
||||||
|
#endif
|
||||||
if (!frozen && dirty)
|
if (!frozen && dirty)
|
||||||
{
|
{
|
||||||
if (!drawing)
|
if (!drawing)
|
||||||
@ -205,7 +207,10 @@ void QgsMapCanvas::render2()
|
|||||||
double muppX, muppY;
|
double muppX, muppY;
|
||||||
muppY = currentExtent.height() / height();
|
muppY = currentExtent.height() / height();
|
||||||
muppX = currentExtent.width() / width();
|
muppX = currentExtent.width() / width();
|
||||||
// std::cout << "MuppX is: " << muppX << "\nMuppY is: " << muppY << std::endl;
|
#ifdef QGISDEBUG
|
||||||
|
std::cout << "Current extent is " << currentExtent.stringRep() << std::endl;
|
||||||
|
std::cout << "MuppX is: " << muppX << "\nMuppY is: " << muppY << std::endl;
|
||||||
|
#endif
|
||||||
m_mupp = muppY > muppX ? muppY : muppX;
|
m_mupp = muppY > muppX ? muppY : muppX;
|
||||||
// calculate the actual extent of the mapCanvas
|
// calculate the actual extent of the mapCanvas
|
||||||
double dxmin, dxmax, dymin, dymax, whitespace;
|
double dxmin, dxmax, dymin, dymax, whitespace;
|
||||||
@ -229,10 +234,13 @@ void QgsMapCanvas::render2()
|
|||||||
// endl << "dymax: " << dymax << std::endl << "whitespace: " << whitespace << std::endl;
|
// endl << "dymax: " << dymax << std::endl << "whitespace: " << whitespace << std::endl;
|
||||||
coordXForm->setParameters(m_mupp, dxmin, dymin, height()); //currentExtent.xMin(), currentExtent.yMin(), currentExtent.yMax());
|
coordXForm->setParameters(m_mupp, dxmin, dymin, height()); //currentExtent.xMin(), currentExtent.yMin(), currentExtent.yMax());
|
||||||
// update the currentExtent to match the device coordinates
|
// update the currentExtent to match the device coordinates
|
||||||
currentExtent.setXmin(dxmin);
|
//GS - removed the current extent update to fix bug --
|
||||||
currentExtent.setXmax(dxmax);
|
//TODO remove the next 4 lines after we're sure this works ok
|
||||||
currentExtent.setYmin(dymin);
|
/*currentExtent.setXmin(dxmin);
|
||||||
currentExtent.setYmax(dymax);
|
currentExtent.setXmax(dxmax);
|
||||||
|
currentExtent.setYmin(dymin);
|
||||||
|
currentExtent.setYmax(dymax); */
|
||||||
|
|
||||||
// render all layers in the stack, starting at the base
|
// render all layers in the stack, starting at the base
|
||||||
std::list < QString >::iterator li = zOrder.begin();
|
std::list < QString >::iterator li = zOrder.begin();
|
||||||
// std::cout << "MAP LAYER COUNT: " << layers.size() << std::endl;
|
// std::cout << "MAP LAYER COUNT: " << layers.size() << std::endl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user