几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】how to use undoredo (http://www.dimcax.com/hust/showthread.php?t=16800)

yang686526 2009-05-06 03:24 PM

【转帖】how to use undoredo
 
how to use undo/redo
how to use undo/redo
hi all!
how to use undo/redo operations with database?
my code
code:
pdb->disableundorecording(false);
pdb->startundorecord();
...
some work with database
e.g. create line or arc
...
pdb->disableundorecording(true);but pdb->hasundo() return false
last edited by aziyatdinov@infrasoft.ru; 5th march 2009 at 12:14 amfff">.
i rewrite code
code:
if(dbase->isundoblockstarted())
dbase->blockundorecording(false);
dbase->startundorecord();
dbase->blockundorecording(true);
...
add entity to db
...
if (dbase->isundoblockstarted())
dbase->blockundorecording(false);but in function dbase->blockundorecording(false)
dbtransactimpl.cpp line 449
setblockingoption(bbegin ? oddbundocontroller::kblockbegin : oddbundocontroller::kblockend);
and i get exception on oda_assert(m_blockingopt==0); in void oddbundofiler::setblockingoption(oduint32 nopt)
how change m_blockingopt? =)
last edited by aziyatdinov@infrasoft.ru; 5th march 2009 at 06:37 amfff">.


所有的时间均为北京时间。 现在的时间是 02:30 PM.