]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcite.C
fix #832
[lyx.git] / src / insets / insetcite.C
index 8bd95bfdbea5f73c6cad53c8bd0767386521126c..419cf6f21958eb1613de8510f1b2a9d9919cbe7d 100644 (file)
@@ -12,6 +12,7 @@
 #include <config.h>
 
 #include "insetcite.h"
+#include "funcrequest.h"
 #include "buffer.h"
 #include "BufferView.h"
 #include "LaTeXFeatures.h"
@@ -317,20 +318,20 @@ void InsetCitation::setLoadingBuffer(Buffer const * buffer, bool state) const
 }
 
 
-void InsetCitation::edit(BufferView * bv, int, int, mouse_button::state)
+dispatch_result InsetCitation::localDispatch(FuncRequest const & cmd)
 {
-       // A call to edit() indicates that we're no longer loading the
-       // buffer but doing some real work.
-       setLoadingBuffer(bv->buffer(), false);
-
-       InsetCommandMailer mailer("citation", *this);
-       mailer.showDialog(bv);
-}
-
-
-void InsetCitation::edit(BufferView * bv, bool)
-{
-       edit(bv, 0, 0, mouse_button::none);
+       switch (cmd.action) {
+               case LFUN_INSET_EDIT:
+                       // A call to edit indicates that we're no longer loading the
+                       // buffer but doing some real work.
+                       setLoadingBuffer(cmd.view()->buffer(), false);
+                       InsetCommandMailer("citation", *this).showDialog(cmd.view());
+                       break;
+
+               default:
+                       return UNDISPATCHED;
+       }
+       return DISPATCHED;
 }