From e7c9a20ec0c25d0ef3dc3512577fa5fe2e92a5aa Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Tue, 10 Jun 2014 20:06:14 +0100 Subject: [PATCH] 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 ... --- src/BingMap.cpp | 5 +++++ src/GoogleMapControl.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/BingMap.cpp b/src/BingMap.cpp index 42bfca18e..2d085428f 100644 --- a/src/BingMap.cpp +++ b/src/BingMap.cpp @@ -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); } diff --git a/src/GoogleMapControl.cpp b/src/GoogleMapControl.cpp index f64d03cd6..7ab728f66 100644 --- a/src/GoogleMapControl.cpp +++ b/src/GoogleMapControl.cpp @@ -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); }