Le 07/09/13 17:03, Hashini Senaratne a écrit :
As I can understand here you have declared a new RowPainter and with the
disabled drawing tries to pain only the insets. It is assumed that this will
force the re-computation of the positions of the insets.

Exactly. This will give the position when leftedge==0

I did not get the role of 'buffer_.changed(false);'

This is the part that starts the draw machinery. Here is the code from Buffer.cpp:

void Buffer::changed(bool update_metrics) const
{
        if (d->wa_)
                d->wa_->redrawAll(update_metrics);
}

What we do is force a redraw, although we know that most of the times Buffer::draw will not do anything.

I committed this to patch to git. And also did some debugging to see why
this does not work for the remaining problems.
In that particular case, (where I have sent an video to show what goes wrong
in my other message)

Thanks for the video, I understand the problem now.

both cur.getLeftEdge() and left_edge become '0' just
after entering the Math inset. So above strategy change will not be executed
as cur.getLeftEdge() = left_edge.

cur.getLeftEdge should not get reset without reason. Why does it happen?

Also, when normally the text cursor is in the Math inset, the strategy that
is used is DecorationUpdate (stragegy=3), and when this particular situation
occurs that changes to FullScreenUpdate (stragegy=2).

The DecorationUpdate probably occurs when we enter/leave the inset, since the decoration changes. I do not know where the fullscreenupdate comes from.

By the way, I do not see any relationship between the case numbers in the
switch under BufferView::draw and the numbers I am getting for strategies. I
think that is nothing to worry about.

What o you mean? They should be the same (but not the same as those in src/update_flags.h).


Here is a set of data I got from debugging.
1- indicates values before calculating left edge
2- indicates values before calculating left edge
cur means - cur_x

I cannot look at it right now, I'll try on monday.

JMarc

Reply via email to