mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-03 00:02:25 -05:00
[Globe] Delay initial layer update to workaround some mysterious opengl errors
This commit is contained in:
parent
7ddb2928fe
commit
f9c589e4fe
@ -371,8 +371,6 @@ void GlobePlugin::run()
|
||||
mQgisMapLayer = new osgEarth::ImageLayer( options, mTileSource );
|
||||
map->addImageLayer( mQgisMapLayer );
|
||||
|
||||
// Add layers to the map
|
||||
updateLayers();
|
||||
|
||||
// Create the frustum highlight callback
|
||||
mFrustumHighlightCallback = new QgsGlobeFrustumHighlightCallback(
|
||||
@ -417,9 +415,13 @@ void GlobePlugin::run()
|
||||
// which appear when launching the globe a second time:
|
||||
// Delay applySettings one event loop iteration, i.e. one update call of the GL canvas
|
||||
QTimer* timer = new QTimer();
|
||||
QTimer* timer2 = new QTimer();
|
||||
connect( timer, SIGNAL( timeout() ), timer, SLOT( deleteLater() ) );
|
||||
connect( timer2, SIGNAL( timeout() ), timer2, SLOT( deleteLater() ) );
|
||||
connect( timer, SIGNAL( timeout() ), this, SLOT( applySettings() ) );
|
||||
connect( timer2, SIGNAL( timeout() ), this, SLOT( updateLayers() ) );
|
||||
timer->start( 0 );
|
||||
timer2->start( 100 );
|
||||
}
|
||||
|
||||
void GlobePlugin::showSettings()
|
||||
|
Loading…
x
Reference in New Issue
Block a user