]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetref.C
Hold on to your hats.
[lyx.git] / src / insets / insetref.C
index c899d8de94b574b07a99c6cc52571ff6f01e0c81..7f0e3f1b8f1b765b245dbccf425c3ae03193bc58 100644 (file)
@@ -9,9 +9,6 @@
  */
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "insetref.h"
 #include "buffer.h"
@@ -31,13 +28,22 @@ InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf, bool)
 {}
 
 
+InsetRef::~InsetRef()
+{
+       InsetCommandMailer mailer("ref", *this);
+       mailer.hideDialog();
+}
+
+
 void InsetRef::edit(BufferView * bv, int, int, mouse_button::state button)
 {
        // FuncRequestually trigger dialog with button 3 not 1
        if (button == mouse_button::button3)
                bv->owner()->dispatch(FuncRequest(LFUN_REF_GOTO, getContents()));
-       else if (button == mouse_button::button1)
-               bv->owner()->getDialogs().showRef(this);
+       else if (button == mouse_button::button1) {
+               InsetCommandMailer mailer("ref", *this);
+               mailer.showDialog();
+       }
 }