Hi Nyall,

Thanks for your suggestions. I followed the code that you pointed out. It's
in this commit

Unfortunately, it doesn't fix the problem. It still behaves exactly like
the previous approach. Perhaps I missed something?

Best regards.

On Thu, Aug 15, 2019 at 1:19 AM Nyall Dawson <nyall.daw...@gmail.com> wrote:

> On Thu, 15 Aug 2019 at 03:56, Ismail Sunni <imajimat...@gmail.com> wrote:
> > The billboard changes IF the previous billboard is not a symbol. But IF
> the previous billboard is a symbol, and I changed the symbol's properties
> (e.g. color, rotation, shape) the billboard stays the same.
> >
> > In my latest code (pushed by now), I set the billboard to use an
> external image (the success-kid.png) if the symbol's color is white (for
> debugging purpose).
> >
> > If I set the symbol to white, the billboard uses the success-kid as the
> billboard (no matter what is the previous billboard as expected).
> > If the previous symbol is the success-kid, then I changed the symbol's
> properties it will change as expected.
> > If the previous symbol is not the success-kid, then I changed the
> symbol's properties,  it won't change the billboard.
> >
> > When I close QGIS and reopen it, the billboard will show as expected.
> So, I think it's not an issue in saving and restoring the symbol.
> Looking over your branch, I'm almost certain it is.
> Try using QgsSymbolLayerUtils::symbolProperties to save to symbol to a
> string (see
> https://github.com/qgis/QGIS/blob/master/src/core/callouts/qgscallout.cpp#L237
> )
> and something like
> https://github.com/qgis/QGIS/blob/master/src/core/callouts/qgscallout.cpp#L261
> to restore.
> Nyall

Ismail Sunni
QGIS-Developer mailing list
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to