Page 1 of 1

Undo in Tables

Posted: Thu Nov 03, 2022 6:04 pm
by standay
Hi Sergey,

I notice when I type into a table and try to undo, it does nothing. If I click outside the table and undo, it works. Is this the expected behavior? I'd like for the table to undo while I'm still inside the table. I tried this in my rve KeyUp:

Code: Select all

procedure TForm1.rveKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
  if rve.InplaceEditor <> nil then
  begin
    if (Key = ord('Z')) and (Shift = [ssCtrl]) then
      rve.Undo;
  end;
...
This gives me the expected (by me anyway!) behavior. Can you tell me if this is correct?

Thanks Sergey

Stan

Re: Undo in Tables

Posted: Mon Nov 07, 2022 5:10 pm
by Sergey Tkachenko
I cannot reproduce this problem.
I tried both in RichViewActions' ActionTest (where Ctrl+Z is handled by TrvActionUndo) and in a fresh project (just placed TRichViewEdit, TRVStyle, linked them, ran, pasted a table from MS Word).
Maybe you have some events assigned that prevent processing undo?

Re: Undo in Tables

Posted: Mon Nov 07, 2022 5:16 pm
by standay
Hi Sergey,

I was working on some other stuff this morning and fixed a problem with that which also fixed this issue. It was some code dealing with my RVRuler in appIdle.

So, yes, something I did caused it but it's good to have confirmation of how it should work!

Thanks again Sergey, really appreciate your help.

Stan