Skip to content

Commit

Permalink
Fix for resize crash, ticket #2714
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@15771 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Apr 19, 2011
1 parent 740fb5c commit b6eab61
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/gui/qgsmapcanvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit b6eab61

Please sign in to comment.