Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 24, 2016
1 parent 0974f0b commit 2b8b979
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/plugins/globe/globe_plugin.cpp
Expand Up @@ -363,7 +363,7 @@ void GlobePlugin::run()
osgEarth::TileSourceOptions opts;
opts.L2CacheSize() = 0;
opts.tileSize() = 128;
mTileSource = new QgsGlobeTileSource( mQGisIface->mapCanvas(), opts );
mTileSource = new QgsGlobeTileSource( opts );

osgEarth::ImageLayerOptions options( "QGIS" );
options.driver()->L2CacheSize() = 0;
Expand Down Expand Up @@ -1024,7 +1024,7 @@ void GlobePlugin::rebuildQGISLayer()
osgEarth::TileSourceOptions opts;
opts.L2CacheSize() = 0;
opts.tileSize() = 128;
mTileSource = new QgsGlobeTileSource( mQGisIface->mapCanvas(), opts );
mTileSource = new QgsGlobeTileSource( opts );

osgEarth::ImageLayerOptions options( "QGIS" );
options.driver()->L2CacheSize() = 0;
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/globe/qgsglobefrustumhighlight.cpp
Expand Up @@ -15,7 +15,6 @@

#include <qgsrubberband.h>
#include <qgsmapcanvas.h>
#include <qgsmaprenderer.h>
#include <osg/View>
#include <osgEarth/SpatialReference>
#include <osgEarth/Terrain>
Expand All @@ -27,7 +26,7 @@ QgsGlobeFrustumHighlightCallback::QgsGlobeFrustumHighlightCallback( osg::View* v
, mView( view )
, mTerrain( terrain )
, mRubberBand( new QgsRubberBand( mapCanvas, Qgis::Polygon ) )
, mSrs( osgEarth::SpatialReference::create( mapCanvas->mapRenderer()->destinationCrs().toWkt().toStdString() ) )
, mSrs( osgEarth::SpatialReference::create( mapCanvas->mapSettings().destinationCrs().toWkt().toStdString() ) )
{
mRubberBand->setColor( color );
}
Expand Down
4 changes: 1 addition & 3 deletions src/plugins/globe/qgsglobetilesource.cpp
Expand Up @@ -22,7 +22,6 @@
#include "qgsglobetilesource.h"
#include "qgscoordinatetransform.h"
#include "qgslogger.h"
#include "qgsmapcanvas.h"
#include "qgsmaprenderercustompainterjob.h"
#include "qgsmaprendererparalleljob.h"

Expand Down Expand Up @@ -215,9 +214,8 @@ void QgsGlobeTileUpdateManager::renderingFinished()

///////////////////////////////////////////////////////////////////////////////

QgsGlobeTileSource::QgsGlobeTileSource( QgsMapCanvas* canvas, const osgEarth::TileSourceOptions& options )
QgsGlobeTileSource::QgsGlobeTileSource( const osgEarth::TileSourceOptions& options )
: TileSource( options )
, mCanvas( canvas )
{
osgEarth::GeoExtent geoextent( osgEarth::SpatialReference::get( "wgs84" ), -180., -90., 180., 90. );
osgEarth::DataExtentList extents;
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/globe/qgsglobetilesource.h
Expand Up @@ -109,7 +109,7 @@ class QgsGlobeTileUpdateManager : public QObject
class QgsGlobeTileSource : public osgEarth::TileSource
{
public:
QgsGlobeTileSource( QgsMapCanvas* canvas, const osgEarth::TileSourceOptions& options = osgEarth::TileSourceOptions() );
QgsGlobeTileSource( const osgEarth::TileSourceOptions& options = osgEarth::TileSourceOptions() );
Status initialize( const osgDB::Options *dbOptions ) override;
osg::Image* createImage( const osgEarth::TileKey& key, osgEarth::ProgressCallback* progress ) override;
osg::HeightField* createHeightField( const osgEarth::TileKey &/*key*/, osgEarth::ProgressCallback* /*progress*/ ) override { return 0; }
Expand All @@ -125,7 +125,6 @@ class QgsGlobeTileSource : public osgEarth::TileSource

QMutex mTileListLock;
QList<QgsGlobeTileImage*> mTiles;
QgsMapCanvas* mCanvas;
QStringList mLayerSet;
QgsGlobeTileUpdateManager mTileUpdateManager;

Expand Down

2 comments on commit 2b8b979

@nyalldawson
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wonder-sk guess it's time we both started building with globe enabled ;) sorry @jef-n for all the extra work!

@wonder-sk
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooops... indeed! Sorry @jef-n

We should quickly point the finger at Travis - he's the one who should shout first if we break the build :-)

Please sign in to comment.