Commit 0207aeed authored by claes's avatar claes

Attrrefs to objects with just one attributes was interpreted as attrref to whole object

parent 5a6add9e
/*
* Proview $Id: wb_volume.cpp,v 1.35 2006-05-21 22:30:50 lw Exp $
* Proview $Id: wb_volume.cpp,v 1.36 2007-05-28 09:23:49 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -369,7 +369,8 @@ wb_attribute wb_volume::attribute(const pwr_sAttrRef* arp) const
}
// Check if we shall reference the whole object
if (arp->Size == 0 || (arp->Offset == 0 && arp->Size == bdrep->size())) {
if (arp->Size == 0 ||
(arp->Offset == 0 && arp->Size == bdrep->size() && bdrep->nAttribute() != 1)) {
wb_attribute a(sts, orep);
orep->unref();
delete bdrep;
......
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