[QGIS-Developer] GSoC QGIS 3D Improvement: Week 11 Report
Nyall Dawson
nyall.dawson at gmail.com
Wed Aug 14 16:18:54 PDT 2019
On Thu, 15 Aug 2019 at 03:56, Ismail Sunni <imajimatika at 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
More information about the QGIS-Developer
mailing list