>>>>> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

Abdelrazak> Hello, This patch optimizes the redraw problem pointed out
Abdelrazak> by Edwin. There's still too much redraw inside insets but
Abdelrazak> this is fixable.

Abdelrazak> One of the difficult problem that this patch solves is the
Abdelrazak> recursive descending inside Insets within
Abdelrazak> LyXText::editXY(). The problem was that, when clicking on
Abdelrazak> a collapsable inset (ex: Foot), a null inset pointer was
Abdelrazak> returned in any case.

Abdelrazak> I will commit tomorrow if I don't get any comment until
Abdelrazak> then.

  @@ -1029,8 +1029,10 @@
          // via the temp cursor. If the inset wishes to change the real
          // cursor it has to do so explicitly by using
          //  cur.bv().cursor() = cur;  (or similar)
  -     if (inset)
  +     if (inset) {
                  inset->dispatch(cur, cmd);
  +             needRedraw = true;
  +     }

Is there a reason why you cannot depend on the value of cur.update()
to set needsRedraw?

          // This should be just before or just behind the
          // cursor position set above.
  -        InsetBase * inset2 = pars_[pit].getInset(pos - 1);
  -        InsetBase * inset3 = pars_[pit].getInset(pos);
  +    InsetBase * insetBefore = pars_[pit].getInset(pos - 1);
  +    InsetBase * insetBehind = pars_[pit].getInset(pos);

Indentation.

JMarc

Reply via email to