]> git.lyx.org Git - features.git/commitdiff
Fix bug 3258:
authorAbdelrazak Younes <younes@lyx.org>
Mon, 26 Mar 2007 13:36:27 +0000 (13:36 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 26 Mar 2007 13:36:27 +0000 (13:36 +0000)
http://bugzilla.lyx.org/show_bug.cgi?id=3258

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17568 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/insettabular.C
src/insets/insettabular.h

index eaa5a72488f83268c9d9017e097547b0388473ea..bd9b9dff057a65fbf0d9767110f2fa91040f69a8 100644 (file)
@@ -178,19 +178,20 @@ string const featureAsString(LyXTabular::Feature feature)
 InsetTabular::InsetTabular(Buffer const & buf, row_type rows,
                           col_type columns)
        : tabular(buf.params(), max(rows, row_type(1)),
-         max(columns, col_type(1))), buffer_(&buf), scx_(0)
+         max(columns, col_type(1))), buffer_(&buf), scx_(0), is_deleted_(false)
 {}
 
 
 InsetTabular::InsetTabular(InsetTabular const & tab)
        : InsetOld(tab), tabular(tab.tabular),
-               buffer_(tab.buffer_), scx_(0)
+               buffer_(tab.buffer_), scx_(0), is_deleted_(false)
 {}
 
 
 InsetTabular::~InsetTabular()
 {
        InsetTabularMailer(*this).hideDialog();
+       is_deleted_ = true;
 }
 
 
@@ -820,7 +821,8 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
 
        // FIXME: this accesses the position cache before it is initialized
        //resetPos(cur);
-       InsetTabularMailer(*this).updateDialog(&cur.bv());
+       if (!is_deleted_)
+               InsetTabularMailer(*this).updateDialog(&cur.bv());
 }
 
 
index 7e2f9219db740d3c4b0b58edcc7172a425f93724..967838573272ea2b62dda2165837b3dcf626eb45 100644 (file)
@@ -203,6 +203,9 @@ private:
        mutable idx_type first_visible_cell;
        ///
        mutable int scx_;
+       /// Ugly boolean used when this inset is dissolved and
+       /// InsetTabularMailer should not be used.
+       bool is_deleted_;
 };