Closed ivanrg99 closed 2 years ago
I'm sorry, but that line is actually necessary. Removing it introduces a regression in which the position is not saved after dragging the note. Any subsequent changes that trigger a save (such as typing in the note or editing the note title) will also save the new position, but if the user never does any of those things before quitting the app or switching to another group, it won't get saved. This can be quite frustrating if you've spent some time arranging your notes, only to come back later and find that it didn't take.
Also, this doesn't actually fix the memory leak, it just makes it less noticeable when you drag notes around a lot.
I appreciate the contribution, but I'd prefer not to apply a hack that I know introduces a regression, and which doesn't really fix the underlying issue.
I see, I could replicate the exact regression issue you were talking about. Thanks for the insight, I had no idea this was an issue.
No worries! I do intend to fix the underlying memory leak, but it is not trivial as the code in question is an interaction between c and python by way of gobject introspection, so traditional methods of tracking down leaks are messy at best.
When a note is moved, removed the call to queue update the note since it was unnecessary and generated a bunch of new Note Entry instances that could end up costing a lot of memory