On Tue, Nov 11, 2003 at 12:32:34PM +0100, Alfredo Braunstein wrote:
> This an update rationalization: do not call update on the insets, but return
> the update flag in the dispatch result (I've had to put some default update
> value to true in dispatchresult.h,
> Lars please have a look. If that is no
> good, then I'll need a DispatchResult(false, FINISHED_RIGHT, update) for
> putting update = true). Only collapsables/insettext handled here (tables
> are still unoperational).
> 
> For doing this, I've added an LCursor::updatePos to update the cached y
> position of the inset. Both the cached y position and this updatePos can be
> removed if we switch to absolute document coords.

Because we'd call  innerInset()->y() instead?

> Still a lot of cleanup to be done, but seems to work reasonably well
> already.
> 
> The work for making put_selection_at is tricky: we still have the
> chicken-and-egg problem (i.e. andre you were right, but not when
> scrolling):
> 
> if the fitCursor call refers to some point in never-explored-land, then we
> don't have y information in insets there, then we cannot even do an update
> to get it (because we need the y infomation for setting top_y first).
> So this is solved in put_selection_at with:
> 
> - setting top_y to the y of the outerPar (that has good info)
> - calling update
> - calling cursor().updatePos()
> - then call fitCursor()
> 
> Comments?

Just put this full explanation there and not only '//hack for the
chicken and egg problem'

So, fine.

Andre'

Reply via email to