I can find no way to make a canvas item a singleton, i.e., ensure that only one of its class is created. Is there a way?
Can you please elaborate on what you are trying to do?
I can't imagine any circumstances under which a singleton canvasitem class would be useful...
I am not sure if a singleton SPCGrid would be how to resolve bug 1206554. I also am now pessimistic about writing a general singleton pattern at all for a SPCanvasItem subclass, for practical reasons. However, it seems impossible to control the number of SPCGrids from the named view, because it doesn't know about previous existing grids. So I can only offer the referred patch which is an ugly hack, which I ask to commit.
There is no problem with snapping, as that gets done with the grid owned by the named view and that is always the newest grid. But the old SPCGrid still exists and can't be destroyed either (I tried), so it is still visible.
One of the high-visibility bugs that I don't want to have in 0.42.
ralf