Skip to content

Commit

Permalink
Dont pan if next point is in current extent (so we can take advantage…
Browse files Browse the repository at this point in the history
… of render caching

git-svn-id: http://svn.osgeo.org/qgis/trunk@11911 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Nov 3, 2009
1 parent a2edffb commit 9037eb5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp
Expand Up @@ -540,7 +540,11 @@ void eVisGenericEventBrowserGui::displayImage( )
//keep the extent the same just center the map canvas in the display so our feature is in the middle
QgsRectangle myRect( myPoint.x( ) - ( mCanvas->extent( ).width( ) / 2 ), myPoint.y( ) - ( mCanvas->extent( ).height( ) / 2 ), myPoint.x( ) + ( mCanvas->extent( ).width( ) / 2 ), myPoint.y( ) + ( mCanvas->extent( ).height( ) / 2 ) );

mCanvas->setExtent( myRect );
// only change the extents if the point is beyond the current extents to minimise repaints
if ( !mCanvas->extent().contains( myPoint ) )
{
mCanvas->setExtent( myRect );
}
mCanvas->refresh( );
}
}
Expand Down

0 comments on commit 9037eb5

Please sign in to comment.