View Issue Details

IDProjectCategoryView StatusLast Update
0031411Open CASCADEOCCT:Application Frameworkpublic2020-05-04 09:18
ReportertizmayloAssigned Tobugmaster  
PrioritynormalSeveritymajor 
Status closedResolutionunable to reproduce 
Product Version7.4.0 
Target Version7.5.0 
Summary0031411: Application Framework - Undo buffer is limitless in TDocStd_Document
DescriptionIf one sets the limit for the undo buffer of TDocStd_Document object via calling TDocStd_Document::SetUndoLimit() method the passed value is not taken into account and the undo buffer stays limitless. It is because the line myUndos.RemoveFirst(); in TDocStd_Document::CommitTransaction() method is disabled from the compilation by the macro SRN_DELTA_COMPACT that is simply defined at the beginning of TDocStd_Document.cxx source file.
Steps To ReproduceThis issue is not reproducible.
TagsNo tags attached.
Test case number

Activities

mpv

2020-04-21 16:29

developer   ~0091706

I can not reproduce this problem. SetUndoLimit works correctly and TDocStd_Document::CommitTransaction() works fine. The following test script in Draw may be used to check it:
pload ALL
NewDocument D BinOcaf
UndoLimit D 3
NewCommand D
Label D 0:1
SetReal D 0:1 1.1
NewCommand D
SetReal D 0:1 2.2
NewCommand D
SetReal D 0:1 3.3
NewCommand D
SetReal D 0:1 4.4
NewCommand D
SetReal D 0:1 5.5
CommitCommand D
Undo D
Undo D
Undo D
Undo D
=====> Undo not done
GetReal D 0:1
=====> 2.2000000000000002

Also, I found that RemoveFirst does not disabled in the CommitTransaction:

...
#ifdef SRN_DELTA_COMPACT
          Handle(TDF_Delta) aDelta = myUndos.First();
#endif
          myUndos.RemoveFirst();
#ifdef SRN_DELTA_COMPACT
          if(myFromUndo == aDelta) {
...

Dear tizmaylo, could you describe how do you reproduce the problem?

tizmaylo

2020-04-21 18:59

developer   ~0091707

I'm sorry, this issue is not relevant to OCCT, it was the internal problem in our project. This issue should be closed.

mpv

2020-04-22 09:15

developer   ~0091710

Dear Bugmaster, please close this issue. Nothing to do with it.

Issue History

Date Modified Username Field Change
2020-03-05 19:58 tizmaylo New Issue
2020-03-05 19:58 tizmaylo Assigned To => mpv
2020-03-05 20:00 tizmaylo Summary Undo buffer is limitless in TDocStd_Document => Application Framework - Undo buffer is limitless in TDocStd_Document
2020-03-05 20:01 tizmaylo Description Updated
2020-04-21 16:29 mpv Note Added: 0091706
2020-04-21 16:30 mpv Assigned To mpv => tizmaylo
2020-04-21 16:31 mpv Status new => feedback
2020-04-21 18:59 tizmaylo Note Added: 0091707
2020-04-21 19:01 tizmaylo Assigned To tizmaylo => mpv
2020-04-21 19:01 tizmaylo Status feedback => resolved
2020-04-21 19:01 tizmaylo Steps to Reproduce Updated
2020-04-22 09:14 mpv Assigned To mpv => bugmaster
2020-04-22 09:15 mpv Note Added: 0091710
2020-05-04 09:18 abv Status resolved => closed
2020-05-04 09:18 abv Resolution open => unable to reproduce