-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vertex Tool uses old cached data resulting in corrupted data in db #40720
Comments
Could you check if snapping works for the correct updated line or for the wrong outdated line? ie. after moving and saving from window2 go to window1 and create a new line, trying to snap on the new and old existing lines. |
I am using QGIS only for a few days, so I am new to it. But i believe that this is what you wanted. tvwNcuAekt.mp4 |
Yes, indeed, snapping also misbehaves. You could resync things by changing the project CRS in order to force a rebuild to all layers' locators, but this is hacky as hell! |
This is exactly the situation that the notify support added for postgres a few years back was designed to help with. See |
I don't think so, notify is only to avoid having to refresh the map manually. I have hit another related bug where the layer's locator thinks the layer is empty, and it is stuck like this, unable to snap on the layer or use vertex tool, unless I changed the CRS to force a rebuild. |
Hm - are you sure about that? I believe handling multi-user snapping was one of the main drivers behind the notify work. In any case, I think it's the correct approach to handle this situation. Maybe we are just missing the code to invalidate the snapping cache when notified by postgres. |
This is not a postgres thing, it's provider independent. |
You probably want to check with @wonder-sk there. That was the approach really old qgis versions used before @wonder-sk reworked snapping, and it didn't work well in practice. |
This issue is a duplicate of #31251 |
I have this problem's solution for my data set. I've made simple plugin which makes indexing strategy IndexExtent and connects some signals together. |
For this use case, defining data dependencies between your two layers should do just fine (see here and data dependencies in here )
I agree. For now, we just trigger repaint, if we fire a dataSourceChanged or dataChanged it should fix the issue. I'm gonna make some tests and propose a PR.
Building the snapping index is expensive, you can't do it every time you render the canvas, people are already complaining about the time it takes when they want to edit large dataset. Hence the tip to change the indexing strategy with IndexExtent, but that's a workaround, not a fine way to deal with this. My thoughts on how to properly manage indexing:
I just have to find time to POC this and create a QEP if it works. |
@troopa81 thank you for your time. I tried data dependencies in my project, but this functionality is blocked in last QGIS releases by this PR #37475. I proposed a PR #41463 that is supposed to fix |
(cherry picked from commit 618734a)
(cherry picked from commit 618734a)
Description of the bug
Vertex Tool uses old cached data resulting in corrupted data in db. This issue is very similar to closed one:
New node tool snapping index out of sync for transaction groups (and triggers in the DB) #25142 (Oct 4, 2017)
Scenario in order to reproduce the issue with video timestamps:
QGIS and OS versions
QGIS-dev
Additional context
TestDataSet.zip
RTwwDDVnC5.mp4
The text was updated successfully, but these errors were encountered: