Commit 4ea03d27 authored by claes's avatar claes

Object attributes wasn't displayed in nav

parent db87a91b
This diff is collapsed.
/* /*
* Proview $Id: wb_nav.h,v 1.6 2007-01-05 10:40:31 claes Exp $ * Proview $Id: wb_nav.h,v 1.7 2007-08-28 07:30:36 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -67,6 +67,7 @@ class Nav { ...@@ -67,6 +67,7 @@ class Nav {
flow_sAnnotPixmap *pixmap_attr; flow_sAnnotPixmap *pixmap_attr;
flow_sAnnotPixmap *pixmap_attrarray; flow_sAnnotPixmap *pixmap_attrarray;
flow_sAnnotPixmap *pixmap_attrarrayelem; flow_sAnnotPixmap *pixmap_attrarrayelem;
flow_sAnnotPixmap *pixmap_attrobject;
int (*get_plant_select_cb)( void *, char *); int (*get_plant_select_cb)( void *, char *);
int (*set_focus_cb)( void *, void *); int (*set_focus_cb)( void *, void *);
int (*traverse_focus_cb)( void *, void *); int (*traverse_focus_cb)( void *, void *);
......
/* /*
* Proview $Id: wb_wnav_item.cpp,v 1.23 2007-08-27 09:32:45 claes Exp $ * Proview $Id: wb_wnav_item.cpp,v 1.24 2007-08-28 07:30:36 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -419,7 +419,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y) ...@@ -419,7 +419,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y)
if ( bodydef[j].ParClass == pwr_eClass_Output) if ( bodydef[j].ParClass == pwr_eClass_Output)
{ {
new WItemAttrArrayOutput( wnav->brow, ldhses, objid, node, new WItemAttrArrayOutput( wnav->brow, wnav->ldhses, objid, node,
flow_eDest_IntoLast, flow_eDest_IntoLast,
parname, parname,
bodydef[j].Par->Output.Info.Elements, bodydef[j].Par->Output.Info.Elements,
...@@ -431,7 +431,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y) ...@@ -431,7 +431,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y)
output_cnt++; output_cnt++;
} }
else else
new WItemAttrArray( wnav->brow, ldhses, objid, node, new WItemAttrArray( wnav->brow, wnav->ldhses, objid, node,
flow_eDest_IntoLast, flow_eDest_IntoLast,
parname, parname,
bodydef[j].Par->Output.Info.Elements, bodydef[j].Par->Output.Info.Elements,
...@@ -448,7 +448,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y) ...@@ -448,7 +448,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y)
{ {
if ( bodydef[j].Par->Input.Info.Flags & PWR_MASK_NOREMOVE && if ( bodydef[j].Par->Input.Info.Flags & PWR_MASK_NOREMOVE &&
bodydef[j].Par->Input.Info.Flags & PWR_MASK_NOINVERT) bodydef[j].Par->Input.Info.Flags & PWR_MASK_NOINVERT)
new WItemAttr( wnav->brow, ldhses, objid, node, new WItemAttr( wnav->brow, wnav->ldhses, objid, node,
flow_eDest_IntoLast, parname, flow_eDest_IntoLast, parname,
bodydef[j].Par->Input.Info.Type, bodydef[j].Par->Input.Info.Type,
bodydef[j].Par->Input.TypeRef, bodydef[j].Par->Input.TypeRef,
...@@ -456,7 +456,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y) ...@@ -456,7 +456,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y)
bodydef[j].Par->Input.Info.Flags, bodydef[j].Par->Input.Info.Flags,
body, 0); body, 0);
else if ( bodydef[j].Par->Input.Info.Flags & PWR_MASK_NOREMOVE) else if ( bodydef[j].Par->Input.Info.Flags & PWR_MASK_NOREMOVE)
new WItemAttrInputInv( wnav->brow, ldhses, objid, node, new WItemAttrInputInv( wnav->brow, wnav->ldhses, objid, node,
flow_eDest_IntoLast, parname, flow_eDest_IntoLast, parname,
bodydef[j].Par->Input.Info.Type, bodydef[j].Par->Input.Info.Type,
bodydef[j].Par->Input.TypeRef, bodydef[j].Par->Input.TypeRef,
...@@ -464,7 +464,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y) ...@@ -464,7 +464,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y)
bodydef[j].Par->Input.Info.Flags, bodydef[j].Par->Input.Info.Flags,
body, input_cnt); body, input_cnt);
else if ( bodydef[j].Par->Input.Info.Flags & PWR_MASK_NOINVERT) else if ( bodydef[j].Par->Input.Info.Flags & PWR_MASK_NOINVERT)
new WItemAttrInputF( wnav->brow, ldhses, objid, node, new WItemAttrInputF( wnav->brow, wnav->ldhses, objid, node,
flow_eDest_IntoLast, parname, flow_eDest_IntoLast, parname,
bodydef[j].Par->Input.Info.Type, bodydef[j].Par->Input.Info.Type,
bodydef[j].Par->Input.TypeRef, bodydef[j].Par->Input.TypeRef,
...@@ -472,7 +472,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y) ...@@ -472,7 +472,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y)
bodydef[j].Par->Input.Info.Flags, bodydef[j].Par->Input.Info.Flags,
body, input_cnt); body, input_cnt);
else else
new WItemAttrInput( wnav->brow, ldhses, objid, node, new WItemAttrInput( wnav->brow, wnav->ldhses, objid, node,
flow_eDest_IntoLast, parname, flow_eDest_IntoLast, parname,
bodydef[j].Par->Input.Info.Type, bodydef[j].Par->Input.Info.Type,
bodydef[j].Par->Input.TypeRef, bodydef[j].Par->Input.TypeRef,
...@@ -483,7 +483,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y) ...@@ -483,7 +483,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y)
else else
{ {
if ( bodydef[j].Par->Input.Info.Flags & PWR_MASK_NOREMOVE) if ( bodydef[j].Par->Input.Info.Flags & PWR_MASK_NOREMOVE)
new WItemAttr( wnav->brow, ldhses, objid, node, new WItemAttr( wnav->brow, wnav->ldhses, objid, node,
flow_eDest_IntoLast, parname, flow_eDest_IntoLast, parname,
bodydef[j].Par->Input.Info.Type, bodydef[j].Par->Input.Info.Type,
bodydef[j].Par->Input.TypeRef, bodydef[j].Par->Input.TypeRef,
...@@ -491,7 +491,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y) ...@@ -491,7 +491,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y)
bodydef[j].Par->Input.Info.Flags, bodydef[j].Par->Input.Info.Flags,
body, 0); body, 0);
else else
new WItemAttrInputF( wnav->brow, ldhses, objid, node, new WItemAttrInputF( wnav->brow, wnav->ldhses, objid, node,
flow_eDest_IntoLast, parname, flow_eDest_IntoLast, parname,
bodydef[j].Par->Input.Info.Type, bodydef[j].Par->Input.Info.Type,
bodydef[j].Par->Input.TypeRef, bodydef[j].Par->Input.TypeRef,
...@@ -505,7 +505,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y) ...@@ -505,7 +505,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y)
else if ( bodydef[j].ParClass == pwr_eClass_Output) else if ( bodydef[j].ParClass == pwr_eClass_Output)
{ {
if ( bodydef[j].Par->Output.Info.Flags & PWR_MASK_NOREMOVE) if ( bodydef[j].Par->Output.Info.Flags & PWR_MASK_NOREMOVE)
new WItemAttr( wnav->brow, ldhses, objid, node, new WItemAttr( wnav->brow, wnav->ldhses, objid, node,
flow_eDest_IntoLast, parname, flow_eDest_IntoLast, parname,
bodydef[j].Par->Output.Info.Type, bodydef[j].Par->Output.Info.Type,
bodydef[j].Par->Output.TypeRef, bodydef[j].Par->Output.TypeRef,
...@@ -513,7 +513,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y) ...@@ -513,7 +513,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y)
bodydef[j].Par->Output.Info.Flags, bodydef[j].Par->Output.Info.Flags,
body, 0); body, 0);
else else
new WItemAttrOutput( wnav->brow, ldhses, objid, node, new WItemAttrOutput( wnav->brow, wnav->ldhses, objid, node,
flow_eDest_IntoLast, parname, flow_eDest_IntoLast, parname,
bodydef[j].Par->Output.Info.Type, bodydef[j].Par->Output.Info.Type,
bodydef[j].Par->Output.TypeRef, bodydef[j].Par->Output.TypeRef,
...@@ -526,14 +526,14 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y) ...@@ -526,14 +526,14 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y)
else else
{ {
if ( bodydef[j].Par->Output.Info.Flags & PWR_MASK_CLASS) if ( bodydef[j].Par->Output.Info.Flags & PWR_MASK_CLASS)
new WItemAttrObject( wnav->brow, ldhses, objid, node, new WItemAttrObject( wnav->brow, wnav->ldhses, objid, node,
flow_eDest_IntoLast, parname, flow_eDest_IntoLast, parname,
bodydef[j].Par->Output.Info.Type, bodydef[j].Par->Output.Info.Type,
bodydef[j].Par->Output.Info.Size, false, 0, bodydef[j].Par->Output.Info.Size, false, 0,
bodydef[j].Par->Output.Info.Flags, bodydef[j].Par->Output.Info.Flags,
body, 0); body, 0);
else else
new WItemAttr( wnav->brow, ldhses, objid, node, new WItemAttr( wnav->brow, wnav->ldhses, objid, node,
flow_eDest_IntoLast, parname, flow_eDest_IntoLast, parname,
bodydef[j].Par->Output.Info.Type, bodydef[j].Par->Output.Info.Type,
bodydef[j].Par->Output.TypeRef, bodydef[j].Par->Output.TypeRef,
...@@ -547,7 +547,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y) ...@@ -547,7 +547,7 @@ int WItemBaseObject::open_attributes( WNav *wnav, double x, double y)
sts = ldh_GetDocBlock( ldhses, objid, &block, &size); sts = ldh_GetDocBlock( ldhses, objid, &block, &size);
if ( ODD(sts)) { if ( ODD(sts)) {
new WItemDocBlock( wnav->brow, ldhses, objid, block, size, new WItemDocBlock( wnav->brow, wnav->ldhses, objid, block, size,
node, flow_eDest_IntoLast); node, flow_eDest_IntoLast);
attr_exist = 1; attr_exist = 1;
} }
...@@ -2206,10 +2206,21 @@ WItemAttrObject::WItemAttrObject( ...@@ -2206,10 +2206,21 @@ WItemAttrObject::WItemAttrObject(
// Set class annotation // Set class annotation
if ( ((WNav *)brow->userdata)->gbl.show_class) { if ( ((WNav *)brow->userdata)->gbl.show_class) {
sts = ldh_ObjidToName( ldhses, cdh_ClassIdToObjid( type_id), ldh_eName_Object, ldh_tSession lses;
// Objects in mounted volumes has to use its own metavolumes.
if ( ldh_ExternObject( ldhses, objid))
ldh_OpenMntSession( ldhses, objid, &lses);
else
lses = ldhses;
sts = ldh_ObjidToName( lses, cdh_ClassIdToObjid( type_id), ldh_eName_Object,
annot, sizeof(annot), &psize); annot, sizeof(annot), &psize);
if ( ODD(sts)) if ( ODD(sts))
brow_SetAnnotation( node, next_annot++, annot, strlen(annot)); brow_SetAnnotation( node, next_annot++, annot, strlen(annot));
if ( lses != ldhses)
ldh_CloseSession( lses);
} }
// Set description annotation // Set description annotation
...@@ -2291,18 +2302,25 @@ int WItemAttrObject::open_attributes( double x, double y) ...@@ -2291,18 +2302,25 @@ int WItemAttrObject::open_attributes( double x, double y)
int input_cnt = 0; int input_cnt = 0;
int output_cnt = 0; int output_cnt = 0;
int is_casted = 0; int is_casted = 0;
ldh_tSession lses;
classid = type_id; classid = type_id;
// Objects in mounted volumes has to use its own metavolumes.
if ( ldh_ExternObject( ldhses, objid))
ldh_OpenMntSession( ldhses, objid, &lses);
else
lses = ldhses;
// Check if attrobject is casted // Check if attrobject is casted
if ( flags & PWR_MASK_CASTATTR) { if ( flags & PWR_MASK_CASTATTR) {
pwr_sAttrRef ar = cdh_ObjidToAref( objid); pwr_sAttrRef ar = cdh_ObjidToAref( objid);
pwr_sAttrRef aar; pwr_sAttrRef aar;
sts = ldh_ArefANameToAref( ldhses, &ar, name, &aar); sts = ldh_ArefANameToAref( lses, &ar, name, &aar);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
sts = ldh_GetAttrRefOrigTid( ldhses, &aar, &orig_classid); sts = ldh_GetAttrRefOrigTid( lses, &aar, &orig_classid);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
if ( orig_classid != classid) { if ( orig_classid != classid) {
...@@ -2324,10 +2342,10 @@ int WItemAttrObject::open_attributes( double x, double y) ...@@ -2324,10 +2342,10 @@ int WItemAttrObject::open_attributes( double x, double y)
strcpy( body, "SysBody"); strcpy( body, "SysBody");
if ( ((WNav *)brow->userdata)->gbl.show_truedb) if ( ((WNav *)brow->userdata)->gbl.show_truedb)
sts = ldh_GetTrueObjectBodyDef( ldhses, classid, body, 1, sts = ldh_GetTrueObjectBodyDef( lses, classid, body, 1,
&bodydef, &rows); &bodydef, &rows);
else else
sts = ldh_GetObjectBodyDef( ldhses, classid, body, 1, sts = ldh_GetObjectBodyDef( lses, classid, body, 1,
&bodydef, &rows); &bodydef, &rows);
if ( EVEN(sts)) if ( EVEN(sts))
continue; continue;
...@@ -2360,10 +2378,10 @@ int WItemAttrObject::open_attributes( double x, double y) ...@@ -2360,10 +2378,10 @@ int WItemAttrObject::open_attributes( double x, double y)
pwr_sAttrRef aar; pwr_sAttrRef aar;
pwr_sAttrRef ar = cdh_ObjidToAref( objid); pwr_sAttrRef ar = cdh_ObjidToAref( objid);
sts = ldh_ArefANameToAref( ldhses, &ar, parname, &aar); sts = ldh_ArefANameToAref( lses, &ar, parname, &aar);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
sts = ldh_AttributeDisabled( ldhses, &aar, &disabled); sts = ldh_AttributeDisabled( lses, &aar, &disabled);
if ( EVEN(sts)) return sts; if ( EVEN(sts)) return sts;
if ( disabled) if ( disabled)
...@@ -2497,6 +2515,9 @@ int WItemAttrObject::open_attributes( double x, double y) ...@@ -2497,6 +2515,9 @@ int WItemAttrObject::open_attributes( double x, double y)
} }
if ( lses != ldhses)
ldh_CloseSession( lses);
if ( attr_exist && !is_root) { if ( attr_exist && !is_root) {
brow_SetOpen( node, wnav_mOpen_Attributes); brow_SetOpen( node, wnav_mOpen_Attributes);
brow_SetAnnotPixmap( node, 1, brow->pixmap_openattr); brow_SetAnnotPixmap( node, 1, brow->pixmap_openattr);
......
/* /*
* Proview $Id: wb_wnav_selformat.cpp,v 1.6 2007-04-25 13:39:21 claes Exp $ * Proview $Id: wb_wnav_selformat.cpp,v 1.7 2007-08-28 07:30:36 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -90,32 +90,40 @@ pwr_tBoolean wnav_format_selection( ldh_tSesContext ldhses, pwr_sAttrRef attrref ...@@ -90,32 +90,40 @@ pwr_tBoolean wnav_format_selection( ldh_tSesContext ldhses, pwr_sAttrRef attrref
char *name_ptr; char *name_ptr;
pwr_tObjid object = attrref.Objid; pwr_tObjid object = attrref.Objid;
char *name_p; char *name_p;
ldh_tSession lses;
// Objects in mounted volumes has to use its own metavolumes.
if ( ldh_ExternObject( ldhses, attrref.Objid))
ldh_OpenMntSession( ldhses, attrref.Objid, &lses);
else
lses = ldhses;
if ( select_syntax == wnav_eSelectionMode_Extern && !select_attr) { if ( select_syntax == wnav_eSelectionMode_Extern && !select_attr) {
sts = ldh_ObjidToName( ldhses, object, ldh_eName_Objid, sts = ldh_ObjidToName( ldhses, object, ldh_eName_Objid,
name, sizeof(name), &ret_len); name, sizeof(name), &ret_len);
if (EVEN(sts)) return FALSE; if (EVEN(sts)) return FALSE;
strcpy( buff, name); strcpy( buff, name);
return TRUE; return TRUE;
} }
else if ( select_syntax == wnav_eSelectionMode_Extern && select_attr) { else if ( select_syntax == wnav_eSelectionMode_Extern && select_attr) {
sts = ldh_ObjidToName( ldhses, object, ldh_eName_Default, sts = ldh_ObjidToName( lses, object, ldh_eName_Default,
name, sizeof(name), &ret_len); name, sizeof(name), &ret_len);
if (EVEN(sts)) return FALSE; if (EVEN(sts)) return FALSE;
} }
else if ( select_volume) { else if ( select_volume) {
sts = ldh_AttrRefToName(ldhses, &attrref, sts = ldh_AttrRefToName(lses, &attrref,
cdh_mName_volume | cdh_mName_object | cdh_mName_attribute, cdh_mName_volume | cdh_mName_object | cdh_mName_attribute,
&name_p, &ret_len); &name_p, &ret_len);
if (EVEN(sts)) return FALSE; if (EVEN(sts)) return FALSE;
strcpy( name, name_p); strcpy( name, name_p);
} }
else { else {
sts = ldh_AttrRefToName(ldhses, &attrref, sts = ldh_AttrRefToName(lses, &attrref,
cdh_mName_path | cdh_mName_object | cdh_mName_attribute, cdh_mName_path | cdh_mName_object | cdh_mName_attribute,
&name_p, &ret_len); &name_p, &ret_len);
if (EVEN(sts)) return FALSE; if (EVEN(sts)) return FALSE;
strcpy( name, name_p); strcpy( name, name_p);
} }
...@@ -152,13 +160,13 @@ pwr_tBoolean wnav_format_selection( ldh_tSesContext ldhses, pwr_sAttrRef attrref ...@@ -152,13 +160,13 @@ pwr_tBoolean wnav_format_selection( ldh_tSesContext ldhses, pwr_sAttrRef attrref
aref = attrref; aref = attrref;
if (select_attr && !is_class) { if (select_attr && !is_class) {
sts = ldh_GetAttrRefTid( ldhses, &attrref, &classid); sts = ldh_GetAttrRefTid( lses, &attrref, &classid);
if ( EVEN(sts)) return FALSE; if ( EVEN(sts)) return FALSE;
if ( !is_attr || (cdh_tidIsCid(classid) && !attrref.Flags.b.Array)) { if ( !is_attr || (cdh_tidIsCid(classid) && !attrref.Flags.b.Array)) {
// Get the debugparameter if there is one, else add ActualValue // Get the debugparameter if there is one, else add ActualValue
sts = ldh_GetClassBody(ldhses, classid, sts = ldh_GetClassBody(lses, classid,
"GraphPlcNode", &body_class, (char **)&graph_body, &size); "GraphPlcNode", &body_class, (char **)&graph_body, &size);
if ( ODD(sts)) if ( ODD(sts))
strcpy(attr_name, graph_body->debugpar); strcpy(attr_name, graph_body->debugpar);
...@@ -169,13 +177,13 @@ pwr_tBoolean wnav_format_selection( ldh_tSesContext ldhses, pwr_sAttrRef attrref ...@@ -169,13 +177,13 @@ pwr_tBoolean wnav_format_selection( ldh_tSesContext ldhses, pwr_sAttrRef attrref
strcat(name, attr_name); strcat(name, attr_name);
// Check if attribute exists // Check if attribute exists
sts = ldh_NameToAttrRef(ldhses, name, &aref); sts = ldh_NameToAttrRef(lses, name, &aref);
if (ODD(sts)) { if (ODD(sts)) {
sts = ldh_GetAttrRefTid( ldhses, &aref, &classid); sts = ldh_GetAttrRefTid( lses, &aref, &classid);
if ( EVEN(sts)) return FALSE; if ( EVEN(sts)) return FALSE;
if (select_syntax == wnav_eSelectionMode_Extern && select_attr) { if (select_syntax == wnav_eSelectionMode_Extern && select_attr) {
sts = ldh_AttrRefToName(ldhses, &aref, sts = ldh_AttrRefToName(lses, &aref,
ldh_eName_ArefExport, ldh_eName_ArefExport,
&name_ptr, &ret_len); &name_ptr, &ret_len);
if (EVEN(sts)) return FALSE; if (EVEN(sts)) return FALSE;
...@@ -192,7 +200,7 @@ pwr_tBoolean wnav_format_selection( ldh_tSesContext ldhses, pwr_sAttrRef attrref ...@@ -192,7 +200,7 @@ pwr_tBoolean wnav_format_selection( ldh_tSesContext ldhses, pwr_sAttrRef attrref
ldh_sAttrRefInfo info; ldh_sAttrRefInfo info;
int idx; int idx;
ldh_GetAttrRefInfo( ldhses, &aref, &info); ldh_GetAttrRefInfo( lses, &aref, &info);
if ( ODD(sts) && if ( ODD(sts) &&
wnav_type_to_string( info.type, type_buff, NULL)) { wnav_type_to_string( info.type, type_buff, NULL)) {
char num[8]; char num[8];
...@@ -206,9 +214,9 @@ pwr_tBoolean wnav_format_selection( ldh_tSesContext ldhses, pwr_sAttrRef attrref ...@@ -206,9 +214,9 @@ pwr_tBoolean wnav_format_selection( ldh_tSesContext ldhses, pwr_sAttrRef attrref
*p2 = 0; *p2 = 0;
// Get attrref info for array // Get attrref info for array
sts = ldh_NameToAttrRef(ldhses, buff, &aref); sts = ldh_NameToAttrRef(lses, buff, &aref);
if (ODD(sts)) if (ODD(sts))
sts = ldh_GetAttrRefInfo( ldhses, &aref, &info); sts = ldh_GetAttrRefInfo( lses, &aref, &info);
} }
if ( info.type == pwr_eType_String) { if ( info.type == pwr_eType_String) {
sprintf(num, "%d", info.size/info.nElement); sprintf(num, "%d", info.size/info.nElement);
...@@ -228,14 +236,17 @@ pwr_tBoolean wnav_format_selection( ldh_tSesContext ldhses, pwr_sAttrRef attrref ...@@ -228,14 +236,17 @@ pwr_tBoolean wnav_format_selection( ldh_tSesContext ldhses, pwr_sAttrRef attrref
} }
} }
if ( select_syntax == wnav_eSelectionMode_Extern && select_attr) { if ( select_syntax == wnav_eSelectionMode_Extern && select_attr) {
sts = ldh_NameToAttrRef(ldhses, buff, &aref); sts = ldh_NameToAttrRef(lses, buff, &aref);
if (EVEN(sts)) return FALSE; if (EVEN(sts)) return FALSE;
sts = ldh_AttrRefToName( ldhses, &aref, sts = ldh_AttrRefToName( lses, &aref,
ldh_eName_ArefExport, &p1, &size); ldh_eName_ArefExport, &p1, &size);
if (EVEN(sts)) return FALSE; if (EVEN(sts)) return FALSE;
strcpy( buff, p1); strcpy( buff, p1);
} }
if ( lses != ldhses)
ldh_CloseSession( lses);
return TRUE; return TRUE;
} }
......
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