MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #29142 All Revisions ] Back to Issue ]
Summary 0029142: Exception on Redo
Revision 2017-11-15 17:44 by szy
Steps To Reproduce static Standard_Integer TestRedo (Draw_Interpretor& theDI,
                                  Standard_Integer theArgC,
                                  const char** theArgV)
{
  Handle (TDocStd_Application) anApp = DDocStd::GetApplication ();
  Handle (TDocStd_Document) aDoc;
  anApp->NewDocument ("BinOcaf", aDoc);

  TDataStd_Integer::Set (aDoc->Main (), 1);
  TDataStd_Real::Set (aDoc->Main (), 1);

  aDoc->SetUndoLimit (1);
  aDoc->OpenCommand ();

  aDoc->Main ().ForgetAttribute (TDataStd_Integer::GetID ());
  TDataStd_Integer::Set (aDoc->Main (), 1);

  aDoc->CommitCommand ();

  aDoc->Undo ();
  aDoc->Redo ();

  return 0;
}


Test => ..\tests\bugs\caf\bug29142
Revision 2017-09-25 17:42 by dbv
Steps To Reproduce static Standard_Integer TestRedo (Draw_Interpretor& theDI,
                                  Standard_Integer theArgC,
                                  const char** theArgV)
{
  Handle (TDocStd_Application) anApp = DDocStd::GetApplication ();
  Handle (TDocStd_Document) aDoc;
  anApp->NewDocument ("BinOcaf", aDoc);

  TDataStd_Integer::Set (aDoc->Main (), 1);
  TDataStd_Real::Set (aDoc->Main (), 1);

  aDoc->SetUndoLimit (1);
  aDoc->OpenCommand ();

  aDoc->Main ().ForgetAttribute (TDataStd_Integer::GetID ());
  TDataStd_Integer::Set (aDoc->Main (), 1);

  aDoc->CommitCommand ();

  aDoc->Undo ();
  aDoc->Redo ();

  return 0;
}
Revision 2017-09-25 17:41 by dbv
Steps To Reproduce static Standard_Integer TestUndo (Draw_Interpretor& theDI,
                                  Standard_Integer theArgC,
                                  const char** theArgV)
{
  Handle (TDocStd_Application) anApp = DDocStd::GetApplication ();
  Handle (TDocStd_Document) aDoc;
  anApp->NewDocument ("BinOcaf", aDoc);

  TDataStd_Integer::Set (aDoc->Main (), 1);
  TDataStd_Real::Set (aDoc->Main (), 1);

  aDoc->SetUndoLimit (1);
  aDoc->OpenCommand ();

  aDoc->Main ().ForgetAttribute (TDataStd_Integer::GetID ());
  TDataStd_Integer::Set (aDoc->Main (), 1);

  aDoc->CommitCommand ();

  aDoc->Undo ();
  aDoc->Redo ();

  return 0;
}


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker