I'm using QGIS 3.12.1 on Win10 x64.
Overview I have a point layer representing tree positions. I have a calculated field ("rpaR") based on other attributes. I am using the geometry generator in styling to create a buffer around the point.
When I create a point, the geometry generator styling is not displayed. If I then edit that point, changing any attribute, it works. I thought this might be because the calculated field "rpaR" on which the buffer is based was not calculated before saving the new feature, but: (1) I can see the "rpaR" value is there before I save. If I then edit and change an underlying feature that changes the value of the "rpaR", the amended geometry generator styling is implemented immediately.
First, the drag and drop designer, showing the settings for the calculated field rpaR. The expression is as follows:
( if("dbh1" is null,0,("dbh1" / 1000)^2 * "stems1") + if("dbh2" is null,0,("dbh2" / 1000)^2 * "stems2") + if("dbh3" is null,0,("dbh3" / 1000)^2 * "stems3") + if("dbh4" is null,0,("dbh4" / 1000)^2 * "stems4") + if("dbh5" is null,0,("dbh5" / 1000)^2 * "stems5") )^0.5
I note the text tip below the default value field reads "column 'dbh1' not found". I think this is sympomatic of the same issue. After saving the feature and amending any field, 'dbh1' is found and this tip reports the correct value.
Second, the geometry generator field.
Third, plotting the feature (ref arrow) before saving (pressing OK). rpaR has been calculated correctly (blue arrow).
Four. Feature has been plotted - red arrow. But neither the simple marker, nor the geometry generator are displayed.
Five. I edit the feature and change any field. Press OK. Now the geometry generator has created the dashed blue line (red arrow). Also, at the feasture centre, the simple marker is also displayed.
Is this a bug, or some unseen error by me?