Stefan Schimanski wrote:

Am 12.06.2007 um 10:22 schrieb Abdelrazak Younes:

Stefan Schimanski wrote:
No, it's not intentional. It's a bug that notifyCursorLeaves is not called. Had noticed that before some time ago. Will look into it.
This whole updateflag business makes me crazy. The MathMacro get's the notifyCursorLeaves call. It then sets the Update::Force flag to trigger a redraw. But of course the MathMacro does not know what should happen on cursorDown from the last cell.

Couldn't it check if the flag is set to Update::Force?

An excerpt from Cursor::dispatch:

  disp_.update(Update::FitCursor | Update::Force);
  disp_.dispatched(true);
  inset().dispatch(*this, cmd);
  if (disp_.dispatched())
      break;

Ah yes I remember... I wanted to inverse the logic but never found the time to do so.


So checking for Update::Force is not possible like that. And setting it to NoUpdate first and then check for Force will break a lot I guess.

Right, too late for 1.5. Still the inverse logic is better IMHO.


So it marks the lfun as undispatched. But then the Update::Force flag is overwritten later by the cursor down handler of the text.

Maybe you could change this overwritting?

As far
as I see there is no way to trigger a complete redraw reliable from anywhere else than the inset which dispatches the lfun.

If the Cursor is passed there is: by checking and accumulating the update flag.

What do you mean? I don't see how to do anything like that.

I mean: if (cur.result().update() == Update::Force) this means that the flag has been explicitely set previously as opposed to have the default value (Update::FitCursor | Update::Force). Maybe this information could be used?

Abdel.

Reply via email to