On Sat, Jun 09, 2007 at 12:49:09PM +0200, Stefan Schimanski wrote: > It works fine (as far as I can judge after 2 minutes testing). I > added some comments and pulled apart the loop to make the control > flow easier. Alfredo, can you check please? I would be happy if we > could get rid of the signals finally like this. > > Stefan > > > Index: lyx-devel/src/CursorSlice.cpp > =================================================================== > --- lyx-devel.orig/src/CursorSlice.cpp 2007-06-02 11:24:26.000000000 > +0200 > +++ lyx-devel/src/CursorSlice.cpp 2007-06-09 12:11:13.000000000 +0200 > @@ -42,10 +42,6 @@ > : inset_(&p), idx_(0), pit_(0), pos_(0) > { > BOOST_ASSERT(inset_); > - boost::signal<void()> * destroyed_signal = inset_->destroyedSignal(); > - if (destroyed_signal) > - inset_connection_ = destroyed_signal->connect( > - boost::bind(&CursorSlice::invalidate, this)); > } > @@ -55,22 +51,12 @@ > } > -CursorSlice::~CursorSlice() > -{ > - inset_connection_.disconnect(); > -} > - > - > CursorSlice & CursorSlice::operator=(CursorSlice const & cs) > { > inset_ = cs.inset_; > idx_ = cs.idx_; > pit_ = cs.pit_; > pos_ = cs.pos_; > - if (inset_ && inset_->destroyedSignal()) { > - inset_connection_ = inset_->destroyedSignal()->connect( > - boost::bind(&CursorSlice::invalidate, this)); > - } > return *this; > }
Note that probably the whole operator=() can go. Andre'