I added 2 layers in qgis using python but only one layer is shown on canvas. After clicking (anywhere on the canvas) both layers are displayed. 

```
layer =  QgsVectorLayer("Point?field=gid:integer","items","memory")

maplayer=QgsVectorLayer("IND_adm1.shp","IND_adm1.shp","ogr")

QgsMapLayerRegistry.instance().addMapLayers([maplayer,layer])
feature = QgsFeature()
feature.setGeometry( QgsGeometry.fromPoint(QgsPoint(X,Y)) )
feature.setAttributes(values)
layer.startEditing()
layer.addFeature(feature, True)
layer.commitChanges()
layers=[]
layers.append(maplayer)
layers.append(layer)
canvas = QgsMapCanvas()
canvas.setLayerSet([QgsMapCanvasLayer(layers[0])])
canvas.setLayerSet([QgsMapCanvasLayer(layers[1])])
canvas.refresh()
canvas.show()

```

when it run on qgis it will shows only second layer and when i click on canvas it shows both layer
how could I avoided this one click and both layer should be displayed directly using python.