On Wed, Dec 08, 2010 at 05:41:51PM +0100, Vincent van Ravesteijn wrote: > New test. > > InsetGraphicsParams::copy(InsetGraphicsParams const & igp) > { > filename = igp.filename; > > LYXERR0("igp:" << igp.filename << " " << igp.filename.saveAbsPath()); > LYXERR0("this: " << filename << " " << filename.saveAbsPath()); > ... > > } > > > Can you try this and output the result ?
Using a similar patch: void InsetGraphicsParams::copy(InsetGraphicsParams const & igp) { filename = igp.filename; + lyxerr << "igp: \"" << igp.filename << "\" " << igp.filename.saveAbsPath() << endl; + lyxerr << "this: \"" << filename << "\" " << filename.saveAbsPath() << endl; ... } I get the following output on Cygwin: Insert an image: igp: "" 1 this: "" 1 igp: "/c/work/mac.png" 0 this: "/c/work/mac.png" 0 igp: "" 1 this: "" 1 igp: "/c/work/mac.png" 0 this: "/c/work/mac.png" 0 igp: "" 1 this: "" 1 Select and copy it: igp: "/c/work/mac.png" 0 this: "/c/work/mac.png" 0 igp: "/c/work/mac.png" 0 this: "/c/work/mac.png" 0 igp: "/c/work/mac.png" 0 this: "/c/work/mac.png" 0 igp: "/c/work/mac.png" 0 this: "/c/work/mac.png" 0 igp: "/c/work/mac.png" 0 this: "/c/work/mac.png" 0 igp: "/c/work/mac.png" 0 this: "/c/work/mac.png" 0 Paste the copy: igp: "/c/work/mac.png" 0 this: "/c/work/mac.png" 0 igp: "/c/work/mac.png" 0 this: "/c/work/mac.png" 0 igp: "/c/work/mac.png" 0 this: "/c/work/mac.png" 0 Click on the pasted copy and then on "Cancel": igp: "" 1 this: "" 1 igp: "/c/work/mac.png" 0 this: "/c/work/mac.png" 0 igp: "/c/work/mac.png" 0 this: "/c/work/mac.png" 0 igp: "" 1 this: "" 1 Click on the original image and then on "Cancel": igp: "" 1 this: "" 1 igp: "/c/work/mac.png" 0 this: "/c/work/mac.png" 0 igp: "/c/work/mac.png" 0 this: "/c/work/mac.png" 0 igp: "" 1 this: "" 1 It would be interesting to see what is the output on a Mac. If we get any "1" whenever the filename in not empty, we also have the explanation of why the bug only occurs on Mac (but not why it does). -- Enrico