@@ -76,8 +76,8 @@ GlobePlugin::GlobePlugin( QgisInterface* theQgisInterface )
76
76
viewer(),
77
77
mQDockWidget( tr( " Globe" ) ),
78
78
mSettingsDialog( &viewer, theQgisInterface->mainWindow (), QgisGui::ModalDialogFlags ),
79
- mTileSource( 0 ),
80
79
mQgisMapLayer( 0 ),
80
+ mTileSource( 0 ),
81
81
mElevationManager( NULL ),
82
82
mObjectPlacer( NULL )
83
83
{
@@ -97,7 +97,7 @@ GlobePlugin::~GlobePlugin()
97
97
struct PanControlHandler : public NavigationControlHandler
98
98
{
99
99
PanControlHandler ( osgEarth::Util::EarthManipulator* manip, double dx, double dy ) : _manip( manip ), _dx( dx ), _dy( dy ) { }
100
- virtual void onMouseDown ( Control* control, int mouseButtonMask )
100
+ virtual void onMouseDown ( Control* /* control*/ , int /* mouseButtonMask*/ )
101
101
{
102
102
_manip->pan ( _dx, _dy );
103
103
}
@@ -110,7 +110,7 @@ struct PanControlHandler : public NavigationControlHandler
110
110
struct RotateControlHandler : public NavigationControlHandler
111
111
{
112
112
RotateControlHandler ( osgEarth::Util::EarthManipulator* manip, double dx, double dy ) : _manip( manip ), _dx( dx ), _dy( dy ) { }
113
- virtual void onMouseDown ( Control* control, int mouseButtonMask )
113
+ virtual void onMouseDown ( Control* /* control*/ , int /* mouseButtonMask*/ )
114
114
{
115
115
if ( 0 == _dx && 0 == _dy )
116
116
{
@@ -130,7 +130,7 @@ struct RotateControlHandler : public NavigationControlHandler
130
130
struct ZoomControlHandler : public NavigationControlHandler
131
131
{
132
132
ZoomControlHandler ( osgEarth::Util::EarthManipulator* manip, double dx, double dy ) : _manip( manip ), _dx( dx ), _dy( dy ) { }
133
- virtual void onMouseDown ( Control* control, int mouseButtonMask )
133
+ virtual void onMouseDown ( Control* /* control*/ , int /* mouseButtonMask*/ )
134
134
{
135
135
_manip->zoom ( _dx, _dy );
136
136
}
@@ -143,7 +143,7 @@ struct ZoomControlHandler : public NavigationControlHandler
143
143
struct HomeControlHandler : public NavigationControlHandler
144
144
{
145
145
HomeControlHandler ( osgEarth::Util::EarthManipulator* manip ) : _manip( manip ) { }
146
- virtual void onClick ( Control* control, int mouseButtonMask, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
146
+ virtual void onClick ( Control* /* control*/ , int /* mouseButtonMask*/ , const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
147
147
{
148
148
_manip->home ( ea, aa );
149
149
}
@@ -154,7 +154,7 @@ struct HomeControlHandler : public NavigationControlHandler
154
154
struct RefreshControlHandler : public ControlEventHandler
155
155
{
156
156
RefreshControlHandler ( GlobePlugin* globe ) : mGlobe ( globe ) { }
157
- virtual void onClick ( Control* control, int mouseButtonMask )
157
+ virtual void onClick ( Control* /* control*/ , int /* mouseButtonMask*/ )
158
158
{
159
159
mGlobe ->layersChanged ();
160
160
}
@@ -165,7 +165,7 @@ struct RefreshControlHandler : public ControlEventHandler
165
165
struct SyncExtentControlHandler : public ControlEventHandler
166
166
{
167
167
SyncExtentControlHandler ( GlobePlugin* globe ) : mGlobe ( globe ) { }
168
- virtual void onClick ( Control* control, int mouseButtonMask )
168
+ virtual void onClick ( Control* /* control*/ , int /* mouseButtonMask*/ )
169
169
{
170
170
mGlobe ->syncExtent ();
171
171
}
@@ -838,6 +838,8 @@ bool NavigationControl::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActi
838
838
}
839
839
_mouse_down_event = NULL ;
840
840
break ;
841
+ default :
842
+ /* ignore */ ;
841
843
}
842
844
if ( _mouse_down_event )
843
845
{
@@ -854,7 +856,7 @@ bool NavigationControl::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActi
854
856
return Control::handle ( ea, aa, cx );
855
857
}
856
858
857
- bool KeyboardControlHandler::handle ( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
859
+ bool KeyboardControlHandler::handle ( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& /* aa */ )
858
860
{
859
861
/*
860
862
osgEarth::Util::EarthManipulator::Settings* _manipSettings = _manip->getSettings();
@@ -961,7 +963,7 @@ bool KeyboardControlHandler::handle( const osgGA::GUIEventAdapter& ea, osgGA::GU
961
963
return false ;
962
964
}
963
965
964
- bool FlyToExtentHandler::handle ( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
966
+ bool FlyToExtentHandler::handle ( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& /* aa */ )
965
967
{
966
968
if ( ea.getEventType () == ea.KEYDOWN && ea.getKey () == ' 1' )
967
969
{
@@ -1002,6 +1004,7 @@ bool QueryCoordinatesHandler::handle( const osgGA::GUIEventAdapter& ea, osgGA::G
1002
1004
osg::Vec3d QueryCoordinatesHandler::getCoords ( float x, float y, osgViewer::View* view, bool getElevation )
1003
1005
{
1004
1006
osgUtil::LineSegmentIntersector::Intersections results;
1007
+ osg::Vec3d coords;
1005
1008
if ( view->computeIntersections ( x, y, results, 0x01 ) )
1006
1009
{
1007
1010
// find the first hit under the mouse:
@@ -1041,9 +1044,9 @@ osg::Vec3d QueryCoordinatesHandler::getCoords( float x, float y, osgViewer::View
1041
1044
}
1042
1045
}
1043
1046
1044
- osg::Vec3d coords = osg::Vec3d ( lon_deg, lat_deg, elevation );
1045
- return coords;
1047
+ coords = osg::Vec3d ( lon_deg, lat_deg, elevation );
1046
1048
}
1049
+ return coords;
1047
1050
}
1048
1051
1049
1052
/* *
0 commit comments