To fix a crash, apply attached. Could all intersted parties (Qt users) please test this out and report back.
-- Angus
Index: src/frontends/controllers/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ChangeLog,v retrieving revision 1.272 diff -u -p -r1.272 ChangeLog --- src/frontends/controllers/ChangeLog 15 Jan 2003 14:23:21 -0000 1.272 +++ src/frontends/controllers/ChangeLog 31 Jan 2003 17:58:24 -0000 @@ -1,3 +1,10 @@ +2003-01-31 Angus Leeming <[EMAIL PROTECTED]> + + * ViewBase.h: add an isVisible() pure virtual method. + + * ControlTabular.C (updateInset): don't build the dialog here. + Instead, do nothing if the dialog is invisible. + 2003-01-15 Dekel Tsur <[EMAIL PROTECTED]> * ControlSpellchecker.[Ch]: Remove XForms RTL hacks. Index: src/frontends/controllers/ControlTabular.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlTabular.C,v retrieving revision 1.3 diff -u -p -r1.3 ControlTabular.C --- src/frontends/controllers/ControlTabular.C 1 Dec 2002 22:59:18 -0000 1.3 +++ src/frontends/controllers/ControlTabular.C 31 Jan 2003 17:58:24 -0000 @@ -44,15 +44,10 @@ void ControlTabular::showInset(InsetTabu void ControlTabular::updateInset(InsetTabular * inset) { + if (!view().isVisible()) + return; lyx::Assert(inset); - connectInset(inset); - - if (!dialog_built_) { - view().build(); - dialog_built_ = true; - } - update(); } Index: src/frontends/controllers/ViewBase.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ViewBase.h,v retrieving revision 1.18 diff -u -p -r1.18 ViewBase.h --- src/frontends/controllers/ViewBase.h 21 Oct 2002 17:38:08 -0000 1.18 +++ src/frontends/controllers/ViewBase.h 31 Jan 2003 17:58:25 -0000 @@ -38,6 +38,8 @@ public: virtual void show() = 0; /// Update dialog before/whilst showing it. virtual void update() = 0; + /// + virtual bool isVisible() const = 0; /** Defaults to nothing. Can be used by the controller, however, to * indicate to the view that something has changed and that the Index: src/frontends/qt2/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ChangeLog,v retrieving revision 1.385 diff -u -p -r1.385 ChangeLog --- src/frontends/qt2/ChangeLog 31 Jan 2003 13:50:21 -0000 1.385 +++ src/frontends/qt2/ChangeLog 31 Jan 2003 17:58:27 -0000 @@ -1,3 +1,7 @@ +2003-01-31 Angus Leeming <[EMAIL PROTECTED]> + + * Qt2Base.[Ch]: instantiate the isVisible() virtual method. + 2003-01-30 Angus Leeming <[EMAIL PROTECTED]> * Dialogs2.C (createIndex): enable ControlCommand to create an Index: src/frontends/qt2/Qt2Base.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/Qt2Base.C,v retrieving revision 1.16 diff -u -p -r1.16 Qt2Base.C --- src/frontends/qt2/Qt2Base.C 20 Oct 2002 01:48:28 -0000 1.16 +++ src/frontends/qt2/Qt2Base.C 31 Jan 2003 17:58:27 -0000 @@ -38,6 +38,12 @@ Qt2BC & Qt2Base::bc() } +bool Qt2Base::isVisible() const +{ + return form() && form()->isVisible(); +} + + void Qt2Base::show() { if (!form()) { Index: src/frontends/qt2/Qt2Base.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/Qt2Base.h,v retrieving revision 1.19 diff -u -p -r1.19 Qt2Base.h --- src/frontends/qt2/Qt2Base.h 20 Oct 2002 01:48:28 -0000 1.19 +++ src/frontends/qt2/Qt2Base.h 31 Jan 2003 17:58:27 -0000 @@ -44,6 +44,8 @@ protected: virtual void show(); /// update the dialog's contents virtual void update_contents() = 0; + /// + virtual bool isVisible() const; /// the dialog has changed contents virtual void changed(); @@ -72,7 +74,7 @@ protected slots: // Close button clicked void slotClose(); private: - /// Pointer to the actual instantiation of xform's form + /// Pointer to the actual instantiation of the Qt dialog virtual QDialog * form() const = 0; private: Index: src/frontends/xforms/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v retrieving revision 1.659 diff -u -p -r1.659 ChangeLog --- src/frontends/xforms/ChangeLog 31 Jan 2003 13:50:21 -0000 1.659 +++ src/frontends/xforms/ChangeLog 31 Jan 2003 17:58:33 -0000 @@ -1,3 +1,7 @@ +2003-01-31 Angus Leeming <[EMAIL PROTECTED]> + + * FormBase.[Ch]: instantiate the isVisible() virtual method. + 2003-01-30 Angus Leeming <[EMAIL PROTECTED]> * Dialogs2.C (createIndex): enable ControlCommand to create an Index: src/frontends/xforms/FormBase.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormBase.C,v retrieving revision 1.68 diff -u -p -r1.68 FormBase.C --- src/frontends/xforms/FormBase.C 16 Dec 2002 11:38:20 -0000 1.68 +++ src/frontends/xforms/FormBase.C 31 Jan 2003 17:58:33 -0000 @@ -65,6 +65,12 @@ FormBase::~FormBase() } +bool FormBase::isVisible() const +{ + return form() && form()->visible; +} + + Tooltips & FormBase::tooltips() { return *tooltips_; Index: src/frontends/xforms/FormBase.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormBase.h,v retrieving revision 1.53 diff -u -p -r1.53 FormBase.h --- src/frontends/xforms/FormBase.h 1 Dec 2002 22:59:19 -0000 1.53 +++ src/frontends/xforms/FormBase.h 31 Jan 2003 17:58:34 -0000 @@ -66,6 +66,8 @@ protected: virtual void hide(); /// Create the dialog if necessary, update it and display it. virtual void show(); + /// + virtual bool isVisible() const; /** Prepare the way to: * 1. display feedback as the mouse moves over ob. This feedback will