From: Abdelrazak Younes Date: Mon, 26 Mar 2007 13:36:27 +0000 (+0000) Subject: Fix bug 3258: X-Git-Tag: 1.6.10~10488 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=4d2732b1e70418bca78ce9d3b1106758fb80c8fa;p=features.git Fix bug 3258: 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 --- diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index eaa5a72488..bd9b9dff05 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -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()); } diff --git a/src/insets/insettabular.h b/src/insets/insettabular.h index 7e2f9219db..9678385732 100644 --- a/src/insets/insettabular.h +++ b/src/insets/insettabular.h @@ -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_; };