asammdf
asammdf copied to clipboard
Fix configuration save with GPS window
The root cause was that runJavaScript() was being called with an incorrect number of parameters. The PySide6 QWebEnginePage.runJavaScript() signature is:
page.runJavaScript(script, callback)
But the code was passing:
page.runJavaScript(script, self.map.mapWidgetIndex,
This caused the callback to not be properly registered, leading to result getting an empty string or not being called correctly. The fix:
- Removed the
self.map.mapWidgetIndexparameter - Added filtering in the callback to reject None or empty string values
Now it should properly wait for a valid zoom value or timeout and returns the default of 15.