File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,12 @@ def __init__(self, canvas):
4141 self .canvas = canvas
4242 self .testRaster = QgsRasterLayer ('data/raster' , "raster" )
4343 self .testVector = QgsVectorLayer ('data/vector' , "vector" , 'ogr' )
44+ QgsMapLayerRegistry .instance ().addMapLayer (self .testRaster )
45+ QgsMapLayerRegistry .instance ().addMapLayer (self .testVector )
46+
47+ self .statusBar = type ('FakeStatusBar' , (),
48+ {'showMessage' : lambda _ , m : None
49+ })()
4450
4551 def zoomFull (self ):
4652 """Zoom to the map full extent"""
@@ -89,7 +95,10 @@ def mainWindow(self):
8995
9096 In case of QGIS it returns an instance of QgisApp
9197 """
92- pass
98+ return type ('FakeMainWindow' , (),
99+ {'statusBar' :
100+ lambda _ : self .statusBar
101+ })()
93102
94103 def addDockWidget (self , area , dockwidget ):
95104 """ Add a dock widget to the main window """
You can’t perform that action at this time.
0 commit comments