Bug report #13233
GPS Information - the Connection is not restored
|GPS Live Tracking
|Affected QGIS version:
|Pull Request or Patch supplied:
|Crashes QGIS or corrupts data:
|Copied to github as #:
GPS Information panel
problem: on QGIS start the Autodetect connection is always selected even though another, like Serial device, was previously used and should have been restored. This is rather annoying.
This occurs on Windows. I believe Linux or Mac versions are also affected.
Also, the 'H accurancy' (sic) and 'V accurancy' fields always show -1 when GPS is connected.
I found in qgsgpsinformationwidget.cpp that there is a test for HAVE_QT_MOBILITY_LOCATION not defined that forces the Autodetect to be selected (negating the restored choice) and the Internal button to be disabled.
Note that that the labels are misspelled as '... accurancy' intead of '... accuracy' -- the ui file needs to be fixed.
As the test is for a compile-time setting the user has absolutely no influence on, I consider that the Internal radiobutton being displayed when there is no Internal availability is just noise. Therefore it should be hidden.
Additionally, I find that the H accurancy and V accurancy display fields' data are from the internal location module. These are also noise as they don't get any data if there is no internal connection.
I offer a patch to change the behavior to:
1. setting Autodetect only if Internal just happened to be the stored connection (it shouldn't happen in normal use)
2. hiding the Internal radiobutton
3. hiding the H and V accuracy labels/text boxes
when HAVE_QT_MOBILITY_LOCATION is not defined.
The patch was taken against final-2_10_1 tag, but should be applied to head. And perhaps back port to other branches that may have further releases.