Hi list in try to 'autoload' a layer with my plugin, i.e. the layer should appear at the time, the plugin is loaded. So I added a load layer funciton in initGui().
If the plugin is activated in the plugin manager, everythings works fine and my layer shows up. If the plugin is already activated at the qgis startup, the layer doesn't show. There is a warning about QPainter not activated at the startup: Warning: QPainter::begin: Cannot paint on a null pixmap Warning: QPainter::setRenderHint: Painter must be active to set rendering hints Warning: QPainter::end: Painter not active, aborted So I guess, the plugins are loaded at a time, where not everything needed is already 'there'. In fact the behaviour of the initGui() isn't the same if loaded during a session or at startup. Is there a way to have the layer also shown if the plugin is activated already at startup? Or more general: What to do, that initGui() does the same in both cases? kind regards Cédric mit freundlichen Grüssen Cédric Möri GIS-Informatiker -- Kanton Solothurn Bau- und Justizdepartement Amt für Geoinformation Rötistrasse 4 4501 Solothurn Telefon: +41 (0)32 627 24 75 Telefax: +41 (0)32 627 22 14 mailto:[email protected] http://www.agi.so.ch _______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
