From af75e269c79d9905d0faa0c32b8fe4c0bfe1594b Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Tue, 5 Dec 2006 05:36:59 +0000 Subject: [PATCH] Add a copy constructor of InsetCollapsable to fix the follow bug: mouse_hover_ is copied with copied collapsable insets. Should be false for newly copied insets. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16182 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/insetcollapsable.C | 17 +++++++++++++++++ src/insets/insetcollapsable.h | 2 ++ 2 files changed, 19 insertions(+) diff --git a/src/insets/insetcollapsable.C b/src/insets/insetcollapsable.C index e90fd05f51..d1e6949a5c 100644 --- a/src/insets/insetcollapsable.C +++ b/src/insets/insetcollapsable.C @@ -63,6 +63,23 @@ InsetCollapsable::InsetCollapsable } +InsetCollapsable::InsetCollapsable(InsetCollapsable const & rhs): + InsetText(rhs), + labelfont_(rhs.labelfont_), + button_dim(rhs.button_dim), + topx(rhs.topx), + topbaseline(rhs.topbaseline), + label(rhs.label), + status_(rhs.status_), + openinlined_(rhs.openinlined_), + autoOpen_(rhs.autoOpen_), + textdim_(rhs.textdim_), + // the sole purpose of this copy constructor + mouse_hover_(false) +{ +} + + void InsetCollapsable::write(Buffer const & buf, ostream & os) const { os << "status "; diff --git a/src/insets/insetcollapsable.h b/src/insets/insetcollapsable.h index 5680dcb3a8..226083870e 100644 --- a/src/insets/insetcollapsable.h +++ b/src/insets/insetcollapsable.h @@ -42,6 +42,8 @@ public: /// InsetCollapsable(BufferParams const &, CollapseStatus status = Open); /// + InsetCollapsable(InsetCollapsable const & rhs); + /// void read(Buffer const &, LyXLex &); /// void write(Buffer const &, std::ostream &) const;