On 28 February 2017 at 18:14, Raymond Nijssen <[email protected]> wrote: > Thanks Nyall! I would have never come up with a workaround like this. > > Should this be fixed? Or is this "by design"? :)
It's more or less a consequence of composer never being written for plugins to hook into. So while it's possible, you'll hit lots of anomalies like this. Fixing this is on my lengthy TO-DO list. Nyall > > Btw, the QgsComposerMap does not like this workaround, BUT also does not > need it because the color widgets seem to get updated anyway. > > Raymond > > > > On 28-02-17 06:27, Nyall Dawson wrote: >> >> On 27 February 2017 at 01:17, Raymond Nijssen <[email protected]> >> wrote: >>> >>> When changing the color of a composer item using python, the >>> corresponding >>> color widget does not update to my new color. >>> >>> For example, changing the label font color: >>> >>> composerLabel.setFontColor(QColor(50,50,50,255)) >>> >>> >>> After a redraw, the label's color in the map does change to my new value. >>> But after selecting it, the widget still shows a black (#000000) value. >>> How >>> can I tell the gui to change as well? And shouldn't setFontColor function >>> tell the gui to change? >>> >>> Hoping anyone can help. >> >> >> Hmm... seems only possible with a silly workaround: >> >> old_id = item.id() >> item.setId('a') >> item.setId(old_id) >> >> Nyall >> > > _______________________________________________ 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
