]> git.lyx.org Git - features.git/commitdiff
tex2lyx/text.cpp: avoid a tex2lyx error message
authorUwe Stöhr <uwestoehr@lyx.org>
Wed, 20 May 2015 20:26:42 +0000 (22:26 +0200)
committerUwe Stöhr <uwestoehr@lyx.org>
Wed, 20 May 2015 20:26:42 +0000 (22:26 +0200)
src/tex2lyx/text.cpp

index 664e2925d595d3043e232c0c2052db55ed8bb90d..ed2a3f7d9d52c637348eedcb91ccf0003c51ecca 100644 (file)
@@ -884,6 +884,7 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags,
                        p.getArg('{', '}');
                        inner_type = "minipage";
                        inner_flags = FLAG_END;
+                       active_environments.push_back("minipage");
                }
                // parse parbox
                else if (p.next_token().asInput() == "\\parbox") {
@@ -1237,6 +1238,8 @@ void parse_box(Parser & p, ostream & os, unsigned outer_flags,
                }
 #endif
        }
+       if (inner_type == "minipage" && (!frame_color.empty() || !background_color.empty()))
+               active_environments.pop_back();
        if (inner_flags != FLAG_BRACE_LAST && (!frame_color.empty() || !background_color.empty())) {
                // in this case we have to eat the the closing brace of the color box
                p.get_token().asInput(); // the '}'