@@ -194,25 +194,25 @@ void GlobePlugin::initGui()
194
194
// Create the action for tool
195
195
mQActionPointer = new QAction ( QIcon ( " :/globe/globe.png" ), tr ( " Launch Globe" ), this );
196
196
mQActionSettingsPointer = new QAction ( QIcon ( " :/globe/globe.png" ), tr ( " Globe Settings" ), this );
197
- QAction* actionUnload = new QAction ( tr ( " Unload Globe" ), this );
197
+ mQActionUnload = new QAction ( tr ( " Unload Globe" ), this );
198
198
199
199
// Set the what's this text
200
200
mQActionPointer ->setWhatsThis ( tr ( " Overlay data on a 3D globe" ) );
201
201
mQActionSettingsPointer ->setWhatsThis ( tr ( " Settings for 3D globe" ) );
202
- actionUnload ->setWhatsThis ( tr ( " Unload globe" ) );
202
+ mQActionUnload ->setWhatsThis ( tr ( " Unload globe" ) );
203
203
204
204
// Connect actions
205
205
connect ( mQActionPointer , SIGNAL ( triggered () ), this , SLOT ( run () ) );
206
206
connect ( mQActionSettingsPointer , SIGNAL ( triggered () ), this , SLOT ( settings () ) );
207
- connect ( actionUnload , SIGNAL ( triggered () ), this , SLOT ( reset () ) );
207
+ connect ( mQActionUnload , SIGNAL ( triggered () ), this , SLOT ( reset () ) );
208
208
209
209
// Add the icon to the toolbar
210
210
mQGisIface ->addToolBarIcon ( mQActionPointer );
211
211
212
212
// Add menu
213
213
mQGisIface ->addPluginToMenu ( tr ( " &Globe" ), mQActionPointer );
214
214
mQGisIface ->addPluginToMenu ( tr ( " &Globe" ), mQActionSettingsPointer );
215
- mQGisIface ->addPluginToMenu ( tr ( " &Globe" ), actionUnload );
215
+ mQGisIface ->addPluginToMenu ( tr ( " &Globe" ), mQActionUnload );
216
216
217
217
connect ( mQGisIface ->mapCanvas () , SIGNAL ( extentsChanged () ),
218
218
this , SLOT ( extentsChanged () ) );
@@ -778,8 +778,12 @@ void GlobePlugin::unload()
778
778
{
779
779
reset ();
780
780
// remove the GUI
781
- mQGisIface ->removePluginMenu ( " &Globe" , mQActionPointer );
781
+ mQGisIface ->removePluginMenu ( tr ( " &Globe" ), mQActionPointer );
782
+ mQGisIface ->removePluginMenu ( tr ( " &Globe" ), mQActionSettingsPointer );
783
+ mQGisIface ->removePluginMenu ( tr ( " &Globe" ), mQActionUnload );
784
+
782
785
mQGisIface ->removeToolBarIcon ( mQActionPointer );
786
+
783
787
delete mQActionPointer ;
784
788
}
785
789
0 commit comments