]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCommand.cpp
Fix mis-nomer
[lyx.git] / src / insets / InsetCommand.cpp
index dadab6ab930a992e33537bdd412629c968a6b0c5..879d9a35e06c56ead351199a55b8f67bdc787310 100644 (file)
@@ -21,6 +21,7 @@
 #include "FuncStatus.h"
 #include "Lexer.h"
 #include "MetricsInfo.h"
+#include "texstream.h"
 
 #include "insets/InsetBox.h"
 #include "insets/InsetBranch.h"
@@ -65,6 +66,20 @@ InsetCommand::InsetCommand(InsetCommand const & rhs)
 {}
 
 
+InsetCommand & InsetCommand::operator=(InsetCommand const & rhs)
+{
+       if (&rhs == this)
+               return *this;
+
+       Inset::operator=(rhs);
+       p_ = rhs.p_;
+       mouse_hover_.clear();
+       button_ = RenderButton();
+
+       return *this;
+}
+
+
 InsetCommand::~InsetCommand()
 {
        if (p_.code() != NO_CODE)
@@ -80,7 +95,7 @@ InsetCommand::~InsetCommand()
 
 void InsetCommand::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       button_.update(screenLabel(), editable() || clickable(0, 0));
+       button_.update(screenLabel(), editable() || clickable(*mi.base.bv, 0, 0));
        button_.metrics(mi, dim);
 }