@@ -96,16 +96,15 @@ def initGui( self ):
96
96
97
97
if rasterMenu == None :
98
98
# no Raster menu, create and insert it before the Help menu
99
- self .menu = QMenu ()
100
- self .menu .setTitle ( rasterText )
99
+ self .menu = QMenu ( rasterText , self .iface .mainWindow () )
101
100
lastAction = actions [ len ( actions ) - 1 ]
102
101
menu_bar .insertMenu ( lastAction , self .menu )
103
102
else :
104
103
self .menu = rasterMenu
105
104
self .menu .addSeparator ()
106
105
107
106
# projections menu (Warp (Reproject), Assign projection)
108
- self .projectionsMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Projections" ) )
107
+ self .projectionsMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Projections" ), self . iface . mainWindow () )
109
108
110
109
self .warp = QAction ( QIcon (":/icons/warp.png" ), QCoreApplication .translate ( "GdalTools" , "Warp (Reproject)" ), self .iface .mainWindow () )
111
110
self .warp .setStatusTip ( QCoreApplication .translate ( "GdalTools" , "Warp an image into a new coordinate system" ) )
@@ -122,7 +121,7 @@ def initGui( self ):
122
121
self .projectionsMenu .addActions ( [ self .warp , self .projection , self .extractProj ] )
123
122
124
123
# conversion menu (Rasterize (Vector to raster), Polygonize (Raster to vector), Translate, RGB to PCT, PCT to RGB)
125
- self .conversionMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Conversion" ) )
124
+ self .conversionMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Conversion" ), self . iface . mainWindow () )
126
125
127
126
if self .GdalVersion >= "1.3" :
128
127
self .rasterize = QAction ( QIcon (":/icons/rasterize.png" ), QCoreApplication .translate ( "GdalTools" , "Rasterize (Vector to raster)" ), self .iface .mainWindow () )
@@ -151,7 +150,7 @@ def initGui( self ):
151
150
self .conversionMenu .addActions ( [ self .translate , self .paletted , self .rgb ] )
152
151
153
152
# extraction menu (Clipper, Contour)
154
- self .extractionMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Extraction" ) )
153
+ self .extractionMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Extraction" ), self . iface . mainWindow () )
155
154
156
155
if self .GdalVersion >= "1.6" :
157
156
self .contour = QAction ( QIcon (":/icons/contour.png" ), QCoreApplication .translate ( "GdalTools" , "Contour" ), self .iface .mainWindow () )
@@ -166,7 +165,7 @@ def initGui( self ):
166
165
self .extractionMenu .addActions ( [ self .clipper ] )
167
166
168
167
# analysis menu (DEM (Terrain model), Grid (Interpolation), Near black, Proximity (Raster distance), Sieve)
169
- self .analysisMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Analysis" ) )
168
+ self .analysisMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Analysis" ), self . iface . mainWindow () )
170
169
171
170
if self .GdalVersion >= "1.6" :
172
171
self .sieve = QAction ( QIcon (":/icons/sieve.png" ), QCoreApplication .translate ( "GdalTools" , "Sieve" ), self .iface .mainWindow () )
@@ -207,7 +206,7 @@ def initGui( self ):
207
206
#self.analysisMenu.addActions( [ ] )
208
207
209
208
# miscellaneous menu (Build overviews (Pyramids), Tile index, Information, Merge, Build Virtual Raster (Catalog))
210
- self .miscellaneousMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Miscellaneous" ) )
209
+ self .miscellaneousMenu = QMenu ( QCoreApplication .translate ( "GdalTools" , "Miscellaneous" ), self . iface . mainWindow () )
211
210
212
211
if self .GdalVersion >= "1.6" :
213
212
self .buildVRT = QAction ( QIcon (":/icons/vrt.png" ), QCoreApplication .translate ( "GdalTools" , "Build Virtual Raster (Catalog)" ), self .iface .mainWindow () )
0 commit comments