<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Alexandre,<br>
<br>
The rubberband belongs to the internals of the maptool. As long as
you don't want to subclass the maptool I think the easiest way is to
send the backspace event to the maptool instead. And I would even
say that this is semantically the correct thing to do.<br>
<br>
Matthias<br>
<br>
<div class="moz-cite-prefix">On 03/27/2016 04:06 PM, Alexandre Neto
wrote:<br>
</div>
<blockquote
cite="mid:CA+H0G_HVouK3aMP-7vLX2WiqH8tW0yi1KW7NHQdWGrZGkQjSzg@mail.gmail.com"
type="cite">
<div dir="ltr">Hello all,
<div><br>
</div>
<div>Can anyone tell me how can I, using Python, access to the
"Add New Feature" QgsRubberBand methods? Or maybe point me to
same sample code?</div>
<div><br>
</div>
<div>I don't want to create a new rubberband, I would like to
access the one that is created by the drawing/editing
maptools.</div>
<div><br>
</div>
<div>I can reach the current mapTool with,</div>
<div><br>
</div>
<div>iface.mapCanvas().mapTool()</div>
<div><br>
</div>
<div>But I'm not understanding how to from there</div>
<div><br>
</div>
<div>I wanted to use removeLastPoint() (or the undo() in ). The
idea is to simulate the backspace key functionality with a
button to use in a tablet device (Windows).</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Alexandre Neto</div>
</div>
<div dir="ltr">-- <br>
</div>
<div dir="ltr">
<div>Alexandre Neto</div>
<div>---------------------</div>
<div>@AlexNetoGeo</div>
<div><a moz-do-not-send="true"
href="http://sigsemgrilhetas.wordpress.com">http://sigsemgrilhetas.wordpress.com</a></div>
<a moz-do-not-send="true"
href="http://gisunchained.wordpress.com">http://gisunchained.wordpress.com</a><br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Qgis-developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Matthias Kuhn
OPENGIS.ch - <a class="moz-txt-link-freetext" href="https://www.opengis.ch">https://www.opengis.ch</a>
Spatial • (Q)GIS • PostGIS • Open Source</pre>
</body>
</html>