Page 1 of 1
Undo after save. How to ?
Posted: Sun Sep 25, 2005 11:21 pm
by Marsianin
Have program with TRichView.
On some events program saves (to stream) text automatically but I'm loosing undo after that.
How to prevent it ? Want undo after save.
Posted: Mon Sep 26, 2005 9:02 am
by Sergey Tkachenko
Undo becomes disabled if you call DeleteUnusedStyles or ClearUndo methods (what's why RichViewActions call DeleteUnusedStyles after loading/creating a document, not on saving)
Posted: Mon Oct 03, 2005 3:45 pm
by Marsianin
My program saves data when main window became inactive and using DeleteUnusedStyles (RVActions used too).
And when I came back to program undo became disabled
Posted: Mon Oct 03, 2005 4:14 pm
by Sergey Tkachenko
Unfortunately, it's unavoidable in the current version, if you use DeleteUnusedStyles. This method deletes all styles which do not present in the document, but some deleted fragment in undo buffer may require them. What's why the undo buffer is cleared.