Fix Map redisplay QT4.8 and Windows

.. webbridge gets stuck and we delete and recreate
   it to reset for a new map display.

   Seems to be a bug in webkit ...
This commit is contained in:
Mark Liversedge
2014-06-10 20:06:14 +01:00
parent 1c77185a59
commit e7c9a20ec0
2 changed files with 10 additions and 0 deletions

View File

@@ -96,6 +96,11 @@ void BingMap::loadRide()
void BingMap::updateFrame()
{
// deleting the web bridge seems to be the only way to
// reset state between it and the webpage.
delete webBridge;
webBridge = new BWebBridge(context, this);
view->page()->mainFrame()->addToJavaScriptWindowObject("webBridge", webBridge);
}

View File

@@ -109,6 +109,11 @@ void GoogleMapControl::loadRide()
void GoogleMapControl::updateFrame()
{
// deleting the web bridge seems to be the only way to
// reset state between it and the webpage.
delete webBridge;
webBridge = new WebBridge(context, this);
view->page()->mainFrame()->addToJavaScriptWindowObject("webBridge", webBridge);
}