<div dir="ltr"><div>Hey Matthais,</div><div><br></div><div>Yes it seems to be a bug caused from another bug fix in 2.2.  There is now a timer on canvas resize in order to stop it rendering all the time when changing the size of widget, however the resize event is also fired when the widget is first shown so it starts the timer and then never repaints the widget hence why you don't see anything.</div>

<div><br></div><div>I ran into this in a recent standalone app of mine and it drove me crazy for about a week.  There is a fix so not to worry.  Just do:</div><div><br></div><div>self.canvas.refresh()</div><div>self.canvas.repaint()</div>

<div><br></div><div>once somewhere after the canvas is created.  You only have to do this once.</div><div><br></div><div>refresh() stops the timer, repaint() tells Qt to rerender the widget, which the canvas doesn't do if the timer is running.</div>

<div><br></div><div>P.S this is also not a issue in the latest dev version due to the multithreading</div><div><br></div><div>- Nathan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 18, 2014 at 2:33 AM, Matthias Ludwig <span dir="ltr"><<a href="mailto:kaotika@gmx.de" target="_blank">kaotika@gmx.de</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Verdana;font-size:12.0px"><div>Hi, I'am writing on a standalone application and discovered some strange behaviour with initial map rendering. I set up a github repo so you can test it. (<a href="https://github.com/datalyze-solutions/qgis_standalone_test" target="_blank">https://github.com/datalyze-solutions/qgis_standalone_test</a>)</div>



<div> </div>

<div>The problem:</div>

<div>- start the plugin from terminal: <span style="font-family:Verdana,sans-serif,Arial,'Trebuchet MS';font-size:13px;line-height:1.6em">python </span><span style="font-family:Verdana,sans-serif,Arial,'Trebuchet MS';font-size:13px;line-height:1.6em">interactive_qgis.py</span></div>



<div>- the map will only be visible if you click the terminal and then the app window</div>

<div> </div>

<div>The problem occurs on Windows and on Linux. I'm certain that it worked like expected with qgis 2.0 (but not 100% sure), maybe its a bug in qgis 2.2?</div>

<div> </div>

<div>Greetings</div></div></div>
<br>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a 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>