I'm working on a Dockwidget with PyQgis.
I made an insert into an Oracle DB and a Spatialite DB and I would like to see the new insert (it's a point).
The Layer where the new point is add is URB_A_ADPT. I'm sure the point is create because I see it in my DB and attribute table. For now, when I zoom and dezoom the point appears but I would like to see it directly.
I tried to simply add
self.refresh = self.canvas.refreshAllLayers()
but it don't seems to be enough to refresh my Oracle layer.
I also tried
if iface.mapCanvas().isCachingEnabled():
layer.triggerRepaint()
else:
iface.mapCanvas().refresh()
from the idea of @andreas-müller but once again I don't see anything.
And my last idee was to set zoom and then directly dezoom
active_layer = iface.activeLayer()
active_layer.zoomFull()
active_layer.zoomToPrevious()
but it don't work.