]> git.lyx.org Git - lyx.git/blobdiff - src/text2.C
revert recent change to development/FORMAT (don't change history)
[lyx.git] / src / text2.C
index cc1cda40c53c094d2d2e4cd042af51a44932ce63..ce1529d9b3e74d18a48a767a59182c269562674a 100644 (file)
@@ -90,7 +90,6 @@ void LyXText::init(BufferView * bv)
        for (pit_type pit = 0; pit != end; ++pit)
                pars_[pit].rows().clear();
 
-       current_font = getFont(pars_[0], 0);
        updateLabels(*bv->buffer());
 }
 
@@ -407,6 +406,10 @@ bool changeDepthAllowed(LyXText::DEPTH_CHANGE type,
 bool LyXText::changeDepthAllowed(LCursor & cur, DEPTH_CHANGE type) const
 {
        BOOST_ASSERT(this == cur.text());
+       // this happens when selecting several cells in tabular (bug 2630)
+       if (cur.selBegin().idx() != cur.selEnd().idx())
+               return false;
+
        pit_type const beg = cur.selBegin().pit();
        pit_type const end = cur.selEnd().pit() + 1;
        int max_depth = (beg != 0 ? pars_[beg - 1].getMaxDepthAfter() : 0);