<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 1/28/15 8:27 AM, Martin Dobias
wrote:<br>
</div>
<blockquote
cite="mid:CAC2XbFd4xuuojtThEYrE=hxG9zE=n+E1bXgKnr83hc9CwY=5HA@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Gary
<div><br>
</div>
<div>I cannot replicate your problem (tried 2.6 and master). I
have attached a very simple test plugin that first creates an
layer and then adds a feature on a click of a button. With the
triggerRepaint() call the canvas is refreshed correctly (when
caching is enabled on or not). Let me know if that code works
for you - maybe your problem is somewhere else or it is more
complex.</div>
<div><br>
</div>
<div>Cheers</div>
<div>Martin</div>
<div><br>
</div>
</div>
</blockquote>
Martin:<br>
<br>
Your example works fine---must be something else going on in my
code. I'll have to dig deeper.<br>
<br>
Thanks for taking the time to put together an example!<br>
<br>
-gary<br>
<blockquote
cite="mid:CAC2XbFd4xuuojtThEYrE=hxG9zE=n+E1bXgKnr83hc9CwY=5HA@mail.gmail.com"
type="cite">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Jan 23, 2015 at 5:52 AM, Gary
Sherman <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:gsherman@geoapt.com" target="_blank">gsherman@geoapt.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">I have a
plugin that makes modifications to a memory layer, then
calls triggerRepaint() to refresh. Unfortunately, it doesn't
refresh the layer. If I open the Python console before
making the mods, it works from the console:<br>
<br>
lyr = iface.activeLayer()<br>
lyr.triggerRepaint()<br>
<br>
If I turn off caching in Settings, I don't have a problem
with my plugin.<br>
<br>
You rendering experts have any ideas?<br>
<br>
Thanks,<br>
<br>
-gary<br>
<br>
-- <br>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<br>
Gary Sherman<br>
<br>
Founder, QGIS Project<br>
Consulting: <a moz-do-not-send="true"
href="http://geoapt.com" target="_blank">geoapt.com</a><br>
Publishing: <a moz-do-not-send="true"
href="http://locatepress.com" target="_blank">locatepress.com</a><br>
<br>
We work virtually anywhere<br>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=<br>
<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a moz-do-not-send="true"
href="mailto:Qgis-developer@lists.osgeo.org"
target="_blank">Qgis-developer@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/qgis-developer"
target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Gary Sherman
Founder, QGIS Project
Consulting: geoapt.com
Publishing: locatepress.com
We work virtually anywhere
=-=-=-=-=-=-=-=-=-=-=-=-=-=-= </pre>
</body>
</html>