Fix crash on exit (angus)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@951 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2000-08-03 13:48:33 +00:00
parent 046b5d824c
commit c44a392c34
7 changed files with 16 additions and 14 deletions

View File

@ -1,3 +1,12 @@
2000-08-03 Angus Leeming <a.leeming@ic.ac.uk>
* src/frontends/xforms/FormCommand.[Ch] (d-tor): removed
* src/frontends/xforms/FormCitation.[Ch],
src/frontends/xforms/FormIndex.[Ch],
src/frontends/xforms/FormToc.[Ch],
src/frontends/xforms/FormUrl.[Ch] (d-tors): call free()
2000-08-03 Angus Leeming <a.leeming@ic.ac.uk>
* src/commandtags.h: renamed, created some flags for citation
@ -20,9 +29,6 @@
* src/frontends/xforms/forms/form_index.fd: xforms implementation
of the Index dialog
2000-08-02 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/insets/insetref.C (Latex): rewrite so that there is now
2000-08-01 Dekel Tsur <dekel@math.tau.ac.il>
* src/mathed/math_write.C (MathDecorationInset::Write) Put \protect

View File

@ -52,6 +52,7 @@ FormCitation::FormCitation(LyXView * lv, Dialogs * d)
FormCitation::~FormCitation()
{
free();
delete dialog_;
}

View File

@ -34,12 +34,6 @@ FormCommand::FormCommand(LyXView * lv, Dialogs * d, string const & t)
{}
FormCommand::~FormCommand()
{
free();
}
void FormCommand::showInset( InsetCommand * const inset )
{
if( dialogIsOpen || inset == 0 ) return;
@ -94,7 +88,7 @@ void FormCommand::free()
// we don't need to delete u and h here because
// hide() does that after disconnecting.
if( form() ) {
if( form()->visible)
if( form()->visible )
hide();
fl_free_form(form());
}

View File

@ -31,8 +31,6 @@ class FormCommand : public DialogBase, public noncopyable {
public:
/// Constructor
FormCommand(LyXView *, Dialogs *, string const & );
/// Destructor
virtual ~FormCommand();
/**@name Real per-instance Callback Methods */
//@{
@ -60,6 +58,8 @@ protected:
virtual void update() = 0;
/// Apply from dialog (modify or create inset)
virtual void apply() = 0;
/// Explicitly free the dialog.
void free();
/// delete derived class variables from hide()
virtual void clearStore() {}
/// Pointer to the actual instantiation of the xform's form
@ -87,8 +87,6 @@ private:
void show();
/// Hide the dialog.
void hide();
/// Explicitly free the dialog.
void free();
/**@name Private Data */

View File

@ -39,6 +39,7 @@ FormIndex::FormIndex(LyXView * lv, Dialogs * d)
FormIndex::~FormIndex()
{
free();
delete dialog_;
}

View File

@ -42,6 +42,7 @@ FormToc::FormToc(LyXView * lv, Dialogs * d)
FormToc::~FormToc()
{
free();
delete dialog_;
}

View File

@ -39,6 +39,7 @@ FormUrl::FormUrl(LyXView * lv, Dialogs * d)
FormUrl::~FormUrl()
{
free();
delete dialog_;
}