Hi, One way is to create your own map tool. The add feature tool inherits QgsMapToolDigitizeFeature, which will contains already a lot. You can have a look at the cpp code of QgsMapToolAddFeature and replicate in Python. But I guess you might find some good examples by searching a bit on the web.
Otherwise, you can still access the rubber band by accessing the rubberband (which is a QGraphicsItem) by listing items of the map canvas (which is a QGraphicsView). Without knowing much more, that wouldn't be my preferred approach. It sounds a bit clumsy both in terms of code and UX. Denis Le lun. 18 nov. 2019 à 06:37, 5Nap <[email protected]> a écrit : > Hello! > I'm trying to find a way to modify rubber band, created by AddFeature > action. > The idea is to continue editing by another mapping tool with option to > switch between built-in tools (add new feature, construct arc from "shape > digitizing toolbar" and so on) and my own custom tool. > > Is there such possibility? > > The only way I've found so far creates new rubber band without accesing the > existing one. > > I'm using python, QGIS3.10 > > > > -- > Sent from: > http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-f4099106.html > _______________________________________________ > QGIS-Developer mailing list > [email protected] > List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
_______________________________________________ QGIS-Developer mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
