]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetref.C
prevent crash when inserting minipage in table cell,
[lyx.git] / src / insets / insetref.C
index 651d9a381731ddbd0f93d3a9f6093a2f28eb775e..8edc5ec140bdc678a43a80b9a5753f553d2d59cd 100644 (file)
@@ -21,6 +21,8 @@
 #include "BufferView.h"
 #include "support/lstrings.h"
 
+using namespace lyx::support;
+
 using std::ostream;
 
 InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf)
@@ -28,9 +30,10 @@ InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf)
 {}
 
 
-// InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf, bool)
-//     : InsetCommand(p, false), isLatex(buf.isLatex())
-// {}
+InsetRef::InsetRef(InsetRef const & ir)
+       : InsetCommand(ir), isLatex(ir.isLatex)
+{
+}
 
 
 InsetRef::~InsetRef()
@@ -47,7 +50,7 @@ dispatch_result InsetRef::localDispatch(FuncRequest const & cmd)
                if (cmd.button() == mouse_button::button3)
                        cmd.view()->owner()->
                                dispatch(FuncRequest(LFUN_REF_GOTO, getContents()));
-               if (cmd.button() == mouse_button::button1)
+               else
                        InsetCommandMailer("ref", *this).showDialog(cmd.view());
                return DISPATCHED;