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) ...@@ -375,7 +375,7 @@ bool wb_session::cutOset( pwr_sAttrRef *arp, bool keepref)
copyOset( arp, keepref); copyOset( arp, keepref);
if ( EVEN(m_sts)) return false; 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; pwr_sAttrRef *ap = arp;
while ( cdh_ObjidIsNotNull( ap->Objid)) { while ( cdh_ObjidIsNotNull( ap->Objid)) {
...@@ -385,14 +385,15 @@ bool wb_session::cutOset( pwr_sAttrRef *arp, bool keepref) ...@@ -385,14 +385,15 @@ bool wb_session::cutOset( pwr_sAttrRef *arp, bool keepref)
continue; continue;
} }
deleteFamily( o); ldh_sEvent *ep = m_srep->eventStart(o.oid(), ldh_eEvent_ObjectDeleted);
ldh_sEvent *e = m_srep->eventStart( pwr_cNOid, ldh_eEvent_ObjectDeleted); m_srep->eventOldFamily(ep, o);
m_srep->eventOldFamily( e, o); deleteFamily(o);
m_srep->eventSend(ep);
ap++; ap++;
} }
m_srep->update(); m_srep->update();
m_srep->eventSend( ep); //m_srep->eventSend( ep);
return true; return true;
} }
......
...@@ -495,15 +495,18 @@ bool wb_vrepdb::deleteFamily(pwr_tStatus *sts, wb_orep *orp) ...@@ -495,15 +495,18 @@ bool wb_vrepdb::deleteFamily(pwr_tStatus *sts, wb_orep *orp)
try { try {
o.get(txn); o.get(txn);
printf("wb_vrepdb::deleteFamily %s\n", o.name());
unadopt(txn, o); unadopt(txn, o);
deleteFamilyMember(o.oid(), txn); deleteFamilyMember(o.oid(), txn);
txn->commit(0); txn->commit(0);
printf("wb_vrepdb::deleteFamily success\n");
return true; return true;
} }
catch (DbException &e) { catch (DbException &e) {
printf("wb_vrepdb::deleteFamily failure, %s\n", e.what());
txn->abort(); txn->abort();
*sts = 2;// LDH__DB_ERROR *sts = 2;// LDH__DB_ERROR
return false; 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