
13 Nov
2007
13 Nov
'07
6:04 p.m.
On Nov 13, 2007 1:49 PM, MenTaLguY <mental@...3...> wrote:
I, too, find the idea of a special flag objectionable. But the undo list is directly pertinent to "has the tree changed?". If we want to eliminate the flag, the simplest thing to do is to check whether the current entry in the undo history was also current at the time the document was last saved. This is less expensive than computing a hash, and does not require establishing a particular normalized serialization of the document.
It also has another advantage: just one more check that the undo system is working properly and consistently at all time. The hash method might be considered if our undo was broken beyond repair and we wouldn't dare rely on it :)
--
bulia byak
Inkscape. Draw Freely.
http://www.inkscape.org