|
15 | 15 | * * |
16 | 16 | ***************************************************************************/ |
17 | 17 | #include "qgsgpsinformationwidget.h" |
18 | | -#include "qgsnmeaconnection.h" |
19 | | -#include "qgsgpsconnectionregistry.h" |
20 | | -#include "qgsgpsdetector.h" |
| 18 | + |
21 | 19 | #include "info.h" |
| 20 | + |
| 21 | +#include "qgisapp.h" |
| 22 | +#include "qgsapplication.h" |
22 | 23 | #include "qgscoordinatetransform.h" |
| 24 | +#include "qgsfeatureaction.h" |
| 25 | +#include "qgsgeometry.h" |
| 26 | +#include "qgsgpsconnectionregistry.h" |
| 27 | +#include "qgsgpsdetector.h" |
| 28 | +#include "qgslayertreeview.h" |
| 29 | +#include "qgslogger.h" |
| 30 | +#include "qgsmaprenderer.h" |
| 31 | +#include "qgsmaptooladdfeature.h" |
| 32 | +#include "qgsnmeaconnection.h" |
23 | 33 | #include "qgspoint.h" |
| 34 | +#include "qgsproject.h" |
24 | 35 | #include "qgsrubberband.h" |
25 | | -#include "qgsmaprenderer.h" |
26 | 36 | #include "qgsvectordataprovider.h" |
27 | 37 | #include "qgsvectorlayer.h" |
28 | | -#include "qgsproject.h" |
29 | | -#include "qgsapplication.h" |
30 | | -#include "qgslogger.h" |
31 | | -#include "qgsfeatureaction.h" |
32 | | -#include "qgsgeometry.h" |
33 | | -#include "qgisapp.h" |
34 | 38 |
|
35 | | -//for avoid intersections static method |
36 | | -#include "qgsmaptooladdfeature.h" |
37 | 39 |
|
38 | 40 | // QWT Charting widget |
39 | 41 | #include <qwt_global.h> |
@@ -66,8 +68,6 @@ QgsGPSInformationWidget::QgsGPSInformationWidget( QgsMapCanvas * thepCanvas, QWi |
66 | 68 | { |
67 | 69 | setupUi( this ); |
68 | 70 |
|
69 | | - // to connect signals that layers have changed (which layer, edit state) |
70 | | - mpLegend = QgisApp::instance()->legend(); |
71 | 71 | mpLastLayer = 0; |
72 | 72 |
|
73 | 73 | mLastGpsPosition = QgsPoint( 0.0, 0.0 ); |
@@ -232,7 +232,7 @@ QgsGPSInformationWidget::QgsGPSInformationWidget( QgsMapCanvas * thepCanvas, QWi |
232 | 232 | //SLM - added functionality |
233 | 233 | mLogFile = 0; |
234 | 234 |
|
235 | | - connect( mpLegend, SIGNAL( currentLayerChanged( QgsMapLayer* ) ), |
| 235 | + connect( QgisApp::instance()->layerTreeView(), SIGNAL( currentLayerChanged( QgsMapLayer* ) ), |
236 | 236 | this, SLOT( updateCloseFeatureButton( QgsMapLayer* ) ) ); |
237 | 237 |
|
238 | 238 | mStackedWidget->setCurrentIndex( 3 ); // force to Options |
|
0 commit comments