]> git.lyx.org Git - lyx.git/blobdiff - src/Text3.cpp
Keep dialog connected to cross-ref inset after Apply.
[lyx.git] / src / Text3.cpp
index 869e709635791ee5943f13903e6f7e717804d472..25bc7ec24986d095d6237d5b1ebbb5cfb84383e9 100644 (file)
@@ -1672,7 +1672,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
                        while (cur.pit() + offset <= cur.lastpit()) {
                                Paragraph cpar = pars_[cur.pit() + offset];
                                depth_type nextpar_depth = cpar.params().depth();
-                               if (cur_depth <= nextpar_depth) {
+                               if (cur_depth <= nextpar_depth && nextpar_depth > 0) {
                                        nextpars_depth.push_back(nextpar_depth);
                                        cur_depth = nextpar_depth;
                                        ++offset;