... I'm not sure which. Could some kind sole patch their copy of insetgraphics.C with the attached patch test.diff. (patch < test.diff from the insets directory.) It just adds a counter each time you create and destroy a graphics inset and prints it to console.
Now load up André's test file, also attached. All is fine --- you'll get a picture (not displayed correctly but that's another story). Now repeatedly type and erase the letter "a" in front of the inset. Here I get a new graphics inset created with each key stroke. This may be something to do with my hacking here, but I don't think so since the new inset is created through a clone command which is in the core somewhere. What do you get? If you can replicate this, then this is definitely a horrible, horrible bug! Angus
pnlg.eps
Description: PostScript document
#LyX 1.2 created this file. For more info see http://www.lyx.org/ \lyxformat 220 \textclass article \language german \inputencoding auto \fontscheme default \graphics default \paperfontsize default \spacing single \papersize Default \paperpackage a4 \use_geometry 0 \use_amsmath 0 \use_natbib 0 \use_numerical_citations 0 \paperorientation portrait \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \defskip medskip \quotes_language english \quotes_times 2 \papercolumns 1 \papersides 1 \paperpagestyle default \layout Standard \begin_inset Graphics FormatVersion 1 filename pnlg.eps display default size_type 0 rotateOrigin center lyxsize_type 0 \end_inset \the_end
Index: insetgraphics.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetgraphics.C,v retrieving revision 1.80 diff -u -p -r1.80 insetgraphics.C --- insetgraphics.C 2002/02/13 18:53:36 1.80 +++ insetgraphics.C 2002/02/13 18:58:35 @@ -136,10 +136,14 @@ string const RemoveExtension(string cons } +static int counter = 0; + // Initialize only those variables that do not have a constructor. InsetGraphics::InsetGraphics() : cacheHandle(0), imageLoaded(false) -{} +{ + std::cerr << "# InsetGraphics = " << ++counter << std::endl; +} InsetGraphics::InsetGraphics(InsetGraphics const & ig, bool same_id) @@ -147,6 +151,7 @@ InsetGraphics::InsetGraphics(InsetGraphi , cacheHandle(ig.cacheHandle) , imageLoaded(ig.imageLoaded) { + std::cerr << "# InsetGraphics = " << ++counter << std::endl; setParams(ig.getParams()); if (same_id) id_ = ig.id_; @@ -155,6 +160,7 @@ InsetGraphics::InsetGraphics(InsetGraphi InsetGraphics::~InsetGraphics() { + std::cerr << "# InsetGraphics = " << --counter << std::endl; // Emits the hide signal to the dialog connected (if any) hideDialog(); }