Juergen Spitzmueller <[EMAIL PROTECTED]> writes: | Angus Leeming wrote: >> Oh, if the file is meant to change only at predetermined times, then a >> single line added to lyx_cb.C's Reconfigure would do the trick: >> >> LatexFeatures::getAvailable(); >> >> no? >> >> But you're probably right. Not worth it. At the moment. > | I did it nevertheless. Patch attached. If no one objects, I will commit this. > | Jürgen > | Index: LaTeXFeatures.C | =================================================================== | RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LaTeXFeatures.C,v | retrieving revision 1.116 | diff -u -r1.116 LaTeXFeatures.C | --- LaTeXFeatures.C 24 Jan 2005 17:12:18 -0000 1.116 | +++ LaTeXFeatures.C 27 Jan 2005 16:02:20 -0000 | @@ -84,6 +84,11 @@ | if (!lex.isOK()) | return; | | + // This is necessary for lyx_cb.C's reconfigure | + // (some packages might have been removed) | + if (!packages_.empty()) | + packages_.clear(); | +
Any particualr reason not to just clear it? // Make sure that we are clean packages_.clear(); Without having seen the rest of the code, perhas it would be better to build the new packages in a new object and do a swap after it is setup fresh. Then exception safety will be (kindo) taken care of. -- Lgb