GNOME Bugzilla – Bug 334305
Snippet disappears after reverting
Last modified: 2019-03-23 20:35:28 UTC
Please describe the problem: When I change a system snippet in the snippets manager and revert that snippet it disappears after I reopen the dialog. Steps to reproduce: 1. Change a snippet 2. Revert the snippet 3. Close the dialog and reopen the dialog Actual results: The original snippet doesn't show up Expected results: The original snippet does show up Does this happen every time? No, it happens only if the reverted snippet is the only snippet in that language that is overloaded/overridden by the user Other information:
This happens because when the user snippet is removed when reverting the user library is removed if it was the last snippet in there. This will also remove the snippet itself from the container. The revert does not put the snippet back in because in all other cases the snippet just stays. I'll put up a fix in short time.
Created attachment 61804 [details] [review] Fix disappearing snippet after reverting This simple patch fixes the disappearance of a snippet when it is reverted and it is the last user snippet in the language. The fix simply sets the library of the snippet back to the system library before removing the snippet from the user library, thus not causing it to be removed itself when the user library (and all its snippets) is removed from the container.
The patch looks good to me. Please, commit. Jesse: Feel free to commit simple bug fixes like this one without asking for permission. Only send a note to us about the committed patch. Please, don't commit new features or feature enhancements until we branch for 2.15.
Committed since Jesse still has problem with his CVS account.