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
This commit is contained in:
Bo Peng 2006-12-05 05:36:59 +00:00
parent 41bd1e5fc2
commit af75e269c7
2 changed files with 19 additions and 0 deletions

View File

@ -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 ";

View File

@ -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;