Commit 7422dce9 authored by claes's avatar claes

Volref for casted attribute class was missed if object class was already checked

parent 396adbd5
/*
* Proview $Id: wb_dbs.cpp,v 1.26 2006-05-21 22:30:50 lw Exp $
* Proview $Id: wb_dbs.cpp,v 1.27 2007-02-08 12:45:07 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -1072,6 +1072,36 @@ wb_dbs::cidInsert(pwr_tStatus *sts, pwr_tCid cid, pwr_sAttrRef *arp, sCentry **c
free(lst);
free(arlst);
}
else if ( !(cdh_CidToVid(cid) == 1 && cdh_CidToVid(cid) == 2)) {
// Check class of casted attribute for every instance
pwr_tCid *lst;
pwr_sAttrRef *arlst;
sCentry *entry;
int cnt;
pwr_tStatus lsts;
pwr_sAttrRef aref;
pwr_sAttrRef cast_aref;
pwr_tCid cast_cid;
m_v->merep()->classDependency( &lsts, cid, &lst, &arlst, &cnt);
for ( int i = 0; i < cnt; i++) {
aref = cdh_ArefAdd( arp, &arlst[i]);
if ( aref.Flags.b.CastAttr) {
cast_aref = cdh_ArefToCastAref( &aref);
wb_volume v(m_v);
wb_attribute a = v.attribute( &cast_aref);
if ( a) {
a.value( &cast_cid);
if ( cast_cid != pwr_cNCid)
cidInsert(&lsts, cast_cid, 0, &entry);
}
}
}
free(lst);
free(arlst);
}
}
void
......
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