Pasting the wrong inset.

2003-06-04 Thread Angus Leeming
Sometime ago I put the following message into InsetGraphic::draw // MakeAbsPath returns filename_ unchanged if it is absolute // already. string const file_with_path = MakeAbsPath(params_.filename, bv-buffer()-filePath()); // A 'paste' operation

Re: Pasting the wrong inset.

2003-06-04 Thread John Levon
On Tue, Jun 03, 2003 at 04:21:14PM +, Angus Leeming wrote: // A 'paste' operation creates a new inset with the correct filepath, // but then the 'old' inset stored in the 'copy' operation is actually // added to the buffer. I don't see how this can happen. We clone

Re: Pasting the wrong inset.

2003-06-04 Thread Lars Gullik Bjønnes
Angus Leeming [EMAIL PROTECTED] writes: | Sometime ago I put the following message into InsetGraphic::draw | | // MakeAbsPath returns filename_ unchanged if it is absolute | // already. | string const file_with_path = | MakeAbsPath(params_.filename,

Re: Pasting the wrong inset.

2003-06-04 Thread Lars Gullik Bjønnes
John Levon [EMAIL PROTECTED] writes: | On Tue, Jun 03, 2003 at 04:21:14PM +, Angus Leeming wrote: | | // A 'paste' operation creates a new inset with the correct filepath, | // but then the 'old' inset stored in the 'copy' operation is actually | // added to the

Re: Pasting the wrong inset.

2003-06-04 Thread Angus Leeming
Lars Gullik Bjnnes wrote: Angus Leeming [EMAIL PROTECTED] writes: | Sometime ago I put the following message into InsetGraphic::draw | | // MakeAbsPath returns filename_ unchanged if it is absolute | // already. | string const file_with_path = |

Re: Pasting the wrong inset.

2003-06-04 Thread Angus Leeming
Angus Leeming wrote: If it were stored with a relative path in subdir/file.eps and I cut it and pasted it into a new buffer with a different buffer-filePath(), we failed to find the graphics file. Actually, this description is exactly wrong ;-) If the file is stored with a relative path and

Re: Pasting the wrong inset.

2003-06-04 Thread John Levon
On Tue, Jun 03, 2003 at 05:00:35PM +, Angus Leeming wrote: If the file is stored with a relative path and I either cut it or copy it and then paste it into a buffer with a different buffer-filePath(), then LyX _finds_ and displays it. Of course, no file exists at this absolute (new

Re: Pasting the wrong inset.

2003-06-04 Thread Angus Leeming
John Levon wrote: On Tue, Jun 03, 2003 at 05:00:35PM +, Angus Leeming wrote: If the file is stored with a relative path and I either cut it or copy it and then paste it into a buffer with a different buffer-filePath(), then LyX _finds_ and displays it. Of course, no file exists at this

Re: Pasting the wrong inset.

2003-06-04 Thread John Levon
On Tue, Jun 03, 2003 at 05:21:56PM +, Angus Leeming wrote: Then it should also display the correct path (presumably now absolute) when I open the dialog. And here, where I have removed the fudge I describe, it does not. Why ? The document is saved with relative paths. The absolute path

Pasting the "wrong" inset.

2003-06-04 Thread Angus Leeming
Sometime ago I put the following message into InsetGraphic::draw // MakeAbsPath returns filename_ unchanged if it is absolute // already. string const file_with_path = MakeAbsPath(params_.filename, bv->buffer()->filePath()); // A 'paste' operation

Re: Pasting the "wrong" inset.

2003-06-04 Thread John Levon
On Tue, Jun 03, 2003 at 04:21:14PM +, Angus Leeming wrote: > // A 'paste' operation creates a new inset with the correct filepath, > // but then the 'old' inset stored in the 'copy' operation is actually > // added to the buffer. I don't see how this can happen. We

Re: Pasting the "wrong" inset.

2003-06-04 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Sometime ago I put the following message into InsetGraphic::draw | | // MakeAbsPath returns filename_ unchanged if it is absolute | // already. | string const file_with_path = | MakeAbsPath(params_.filename,

Re: Pasting the "wrong" inset.

2003-06-04 Thread Lars Gullik Bjønnes
John Levon <[EMAIL PROTECTED]> writes: | On Tue, Jun 03, 2003 at 04:21:14PM +, Angus Leeming wrote: | | > // A 'paste' operation creates a new inset with the correct filepath, | > // but then the 'old' inset stored in the 'copy' operation is actually | > // added to

Re: Pasting the "wrong" inset.

2003-06-04 Thread Angus Leeming
Lars Gullik Bjønnes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > > | Sometime ago I put the following message into InsetGraphic::draw > | > | // MakeAbsPath returns filename_ unchanged if it is absolute > | // already. > | string const file_with_path = > |

Re: Pasting the "wrong" inset.

2003-06-04 Thread Angus Leeming
Angus Leeming wrote: > If it were stored with a relative path in subdir/file.eps and I cut it and > pasted it into a new buffer with a different buffer->filePath(), we failed > to find the graphics file. Actually, this description is exactly wrong ;-) If the file is stored with a relative path

Re: Pasting the "wrong" inset.

2003-06-04 Thread John Levon
On Tue, Jun 03, 2003 at 05:00:35PM +, Angus Leeming wrote: > If the file is stored with a relative path and I either cut it or copy it > and then paste it into a buffer with a different buffer->filePath(), then > LyX _finds_ and displays it. Of course, no file exists at this absolute >

Re: Pasting the "wrong" inset.

2003-06-04 Thread Angus Leeming
John Levon wrote: > On Tue, Jun 03, 2003 at 05:00:35PM +, Angus Leeming wrote: > >> If the file is stored with a relative path and I either cut it or copy it >> and then paste it into a buffer with a different buffer->filePath(), then >> LyX _finds_ and displays it. Of course, no file exists

Re: Pasting the "wrong" inset.

2003-06-04 Thread John Levon
On Tue, Jun 03, 2003 at 05:21:56PM +, Angus Leeming wrote: > Then it should also display the correct path (presumably now absolute) when > I open the dialog. And here, where I have removed the fudge I describe, it > does not. Why ? The document is saved with relative paths. The absolute