查看单个帖子
旧 2009-05-06, 03:24 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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">.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)