Commit e3f7211c authored by lw's avatar lw

Cut did not update hierarchy.

parent aab02b14
......@@ -375,7 +375,7 @@ bool wb_session::cutOset( pwr_sAttrRef *arp, bool keepref)
copyOset( arp, keepref);
if ( EVEN(m_sts)) return false;
ldh_sEvent *ep = m_srep->eventStart( pwr_cNOid, ldh_eEvent_ObjectTreeDeleted);
//ldh_sEvent *ep = m_srep->eventStart( pwr_cNOid, ldh_eEvent_ObjectTreeDeleted);
pwr_sAttrRef *ap = arp;
while ( cdh_ObjidIsNotNull( ap->Objid)) {
......@@ -385,14 +385,15 @@ bool wb_session::cutOset( pwr_sAttrRef *arp, bool keepref)
continue;
}
deleteFamily( o);
ldh_sEvent *e = m_srep->eventStart( pwr_cNOid, ldh_eEvent_ObjectDeleted);
m_srep->eventOldFamily( e, o);
ldh_sEvent *ep = m_srep->eventStart(o.oid(), ldh_eEvent_ObjectDeleted);
m_srep->eventOldFamily(ep, o);
deleteFamily(o);
m_srep->eventSend(ep);
ap++;
}
m_srep->update();
m_srep->eventSend( ep);
//m_srep->eventSend( ep);
return true;
}
......
......@@ -495,15 +495,18 @@ bool wb_vrepdb::deleteFamily(pwr_tStatus *sts, wb_orep *orp)
try {
o.get(txn);
printf("wb_vrepdb::deleteFamily %s\n", o.name());
unadopt(txn, o);
deleteFamilyMember(o.oid(), txn);
txn->commit(0);
printf("wb_vrepdb::deleteFamily success\n");
return true;
}
catch (DbException &e) {
printf("wb_vrepdb::deleteFamily failure, %s\n", e.what());
txn->abort();
*sts = 2;// LDH__DB_ERROR
return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment