From: Uwe Stöhr Date: Mon, 11 Feb 2013 10:56:27 +0000 (+0100) Subject: Revert "tex2lyx/Preamble.cpp: fix bug #8525 temporarily" X-Git-Tag: 2.1.0beta1~735 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=5db148d22c2e323dc1166ffece9359cf1686da38;p=features.git Revert "tex2lyx/Preamble.cpp: fix bug #8525 temporarily" This reverts commit a69fcde0726450d696081ed5c21506d42a90b103. The commit causing #8525 is [2f7f0c76/lyxgit] --- diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp index 7d71f333f0..d4c0b036bf 100644 --- a/src/tex2lyx/Preamble.cpp +++ b/src/tex2lyx/Preamble.cpp @@ -853,20 +853,11 @@ void Preamble::handle_package(Parser &p, string const & name, // Therefore check for the "," character. // It is also only set when there is not more than one babel // language option. - if (!opts.empty()) { - if (opts.find(",") == string::npos && one_language == true) { - h_inputencoding = opts; - // FIXME: if this line is used, tex2lyx swallows the next character - // in the file behind "{inputenc}" - //p.setEncoding(opts); - } else { - h_preamble << "\\usepackage[" << opts << "}{" << name << "}\n"; - // FIXME: enabling this introduces bug #8525 - //p.setEncoding(options.back(), Encoding::inputenc); - } - options.clear(); - } else - h_preamble << "\\usepackage{" << name << "}\n"; + if (opts.find(",") == string::npos && one_language == true) + h_inputencoding = opts; + if (!options.empty()) + p.setEncoding(options.back(), Encoding::inputenc); + options.clear(); } else if (name == "srcltx") {