TRichViewEdit Redo/Undo and OnChanging event
Posted: Wed Jun 08, 2016 10:42 am
Hi,
I've been using TRichViewEdit and noticed a possible inconsistency with how the OnChanging event is not triggered before Redo/Undo operations. I noticed this when tracking down some inconsistent behaviour in my app. It seems to me that the event should be triggered.
So would it be sensible to change the code implementation as follows?
I look forward to your thoughts - thanks.
I've been using TRichViewEdit and noticed a possible inconsistency with how the OnChanging event is not triggered before Redo/Undo operations. I noticed this when tracking down some inconsistent behaviour in my app. It seems to me that the event should be triggered.
So would it be sensible to change the code implementation as follows?
Code: Select all
procedure TCustomRichViewEdit.Redo;
begin
...
DoChanging; // Add this call here?
TRVEditRVData(RVData).RedoList.Redo(RVData);
DoChange(False);
end
else
RVData.Beep;
end;
procedure TCustomRichViewEdit.Undo;
begin
...
DoChanging; // Add this call here?
TRVEditRVData(RVData).UndoList.Undo(RVData);
DoChange(False);
end
else
RVData.Beep;
end;