Skip to content
Permalink
Browse files
Fix for resize crash, ticket #2714
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15771 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Apr 19, 2011
1 parent ca683ca commit f4d26d6211830a866030a333236dcfbf15e077aa
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/gui/qgsmapcanvas.cpp
@@ -83,6 +83,12 @@ QgsMapCanvas::QgsMapCanvas( QWidget * parent, const char *name )
, mNewSize( QSize() )
, mPainting( false )
{
//disable the update that leads to the resize crash
if( viewport() )
{
viewport()->setAttribute( Qt::WA_PaintOnScreen, true );
}

mScene = new QGraphicsScene();
setScene( mScene );
setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
@@ -122,7 +128,7 @@ QgsMapCanvas::QgsMapCanvas( QWidget * parent, const char *name )
this, SLOT( readProject( const QDomDocument & ) ) );
connect( QgsProject::instance(), SIGNAL( writeProject( QDomDocument & ) ),
this, SLOT( writeProject( QDomDocument & ) ) );

mMap->resize( size() );
} // QgsMapCanvas ctor


0 comments on commit f4d26d6

Please sign in to comment.