Patch from Melchior Franz:
- add indices to ambiguous property names
This commit is contained in:
parent
057885ed62
commit
e1843e15d4
1 changed files with 5 additions and 7 deletions
|
@ -470,20 +470,18 @@ void fgPropPicker::find_props ()
|
||||||
for (i = 0; i < (int)node->nChildren(); i++) {
|
for (i = 0; i < (int)node->nChildren(); i++) {
|
||||||
SGPropertyNode * child = node->getChild(i);
|
SGPropertyNode * child = node->getChild(i);
|
||||||
name = child->getName();
|
name = child->getName();
|
||||||
|
if ( node->getChild(name, 1) != 0 ) {
|
||||||
|
iindex = child->getIndex();
|
||||||
|
sprintf(sindex, "[%d]", iindex);
|
||||||
|
name += sindex;
|
||||||
|
}
|
||||||
line = name;
|
line = name;
|
||||||
names[ pi ] = new char[ strlen(line.c_str())+2 ] ;
|
names[ pi ] = new char[ strlen(line.c_str())+2 ] ;
|
||||||
strcpy ( names [ pi ], line.c_str() ) ;
|
strcpy ( names [ pi ], line.c_str() ) ;
|
||||||
if ( child->nChildren() > 0 ) {
|
if ( child->nChildren() > 0 ) {
|
||||||
iindex = child->getIndex();
|
|
||||||
sprintf(sindex, "%d", iindex);
|
|
||||||
dflag[ pi ] = 1 ;
|
dflag[ pi ] = 1 ;
|
||||||
files[ pi ] = new char[ strlen(line.c_str())+strlen(sindex)+4 ] ;
|
files[ pi ] = new char[ strlen(line.c_str())+strlen(sindex)+4 ] ;
|
||||||
strcpy ( files [ pi ], line.c_str() ) ;
|
strcpy ( files [ pi ], line.c_str() ) ;
|
||||||
if ( node->getChild(name, 1) != 0 ) {
|
|
||||||
strcat ( files [ pi ], "[" ) ;
|
|
||||||
strcat ( files [ pi ], sindex ) ;
|
|
||||||
strcat ( files [ pi ], "]" ) ;
|
|
||||||
}
|
|
||||||
strcat ( files [ pi ], "/" ) ;
|
strcat ( files [ pi ], "/" ) ;
|
||||||
values[ pi ] = new char[ 2 ] ;
|
values[ pi ] = new char[ 2 ] ;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue