]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCommand.cpp
Make sure we center displayed equations.
[lyx.git] / src / insets / InsetCommand.cpp
index dadab6ab930a992e33537bdd412629c968a6b0c5..fcda3cd2b984175a7cf24169adffb322c2a74095 100644 (file)
@@ -65,6 +65,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 +94,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);
 }