Abdelrazak Younes wrote:
Abdelrazak Younes wrote:
Peter Kümmel wrote:
- new document
- insert 1x1 table
- move curser into the table
- press a key

OK, thanks, I can confirm this.

The problem is as JMarc said a missing updateMetric in the insettabular.

No, it is not that. The problems lies somewhere in InsetTabular::metrics().Or maybe even more deeply in InsetText::metrics() called at line 274 and 282.

The crash happens in

int InsetBase::xo() const
{
    return theCoords.getInsets().x(this);
}

The problem is that theCoords says that it does not find the inset. Which means that theCoords had been cleared and nothing has been added to it. There should be a way to tell BufferView::updateMetrics() to not clear theCoords is we are in an insetTabular or we find a way to reconstruct it like it was before the clear.

This patch fix the crash but will have for sure some side effects.

Index: BufferView_pimpl.C
===================================================================
--- BufferView_pimpl.C  (revision 14787)
+++ BufferView_pimpl.C  (working copy)
@@ -1269,7 +1269,7 @@
 void BufferView::Pimpl::updateMetrics(bool singlepar)
 {
        // Remove old position cache
-       theCoords.clear();
+       //theCoords.clear();
        BufferView & bv = *bv_;
        LyXText * const text = bv.text();
        lyx::pit_type size = int(text->paragraphs().size());

Reply via email to