opengisch/qfieldsync

Default style overrides layer property when syncing

MatparMcWolfie opened this issue · 0 comments

I've been scratching my head over this weird behavior for a while but I finally narrowed down the cause of it (I think):

I created a project with a point layer, for which I set up a form. One field (ID) has a default value expression. After setting everything up, I saved the layer style as default to datasource database (.gpkg). Later on, I realized the expression for default value in ID widget was wrong and I corrected it, but this time I didn't save the style as default.

The project was packaged for cable export through qfield sync, data was captured on location and brought back to office. But when I tried to sync up the data, somehow, the expression saved in the default style applied instead of the one set in the widget parameter.

After saving the syle of the layer to datasource database again (i.e. with updated expression), the problem disappeared.

It appears there is some form of override of the expression set in default style for ID field and widget. Other parameters remains unchanged.

Not a big deal, but it might by worth to look into it. If anything, this post can prevent some headaches to other users.