From: david Date: Wed, 6 Feb 2002 16:53:01 +0000 (+0000) Subject: Patch from Melchior Franz: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fb5d5960a9b5baff925b91e8771ad92f43076b22;p=flightgear.git Patch from Melchior Franz: - don't show redundant indices --- diff --git a/src/GUI/prop_picker.cxx b/src/GUI/prop_picker.cxx index 86ce0d734..e38342fd7 100755 --- a/src/GUI/prop_picker.cxx +++ b/src/GUI/prop_picker.cxx @@ -479,9 +479,12 @@ void fgPropPicker::find_props () dflag[ pi ] = 1 ; files[ pi ] = new char[ strlen(line.c_str())+strlen(sindex)+4 ] ; strcpy ( files [ pi ], line.c_str() ) ; - strcat ( files [ pi ], "[" ) ; - strcat ( files [ pi ], sindex ) ; - strcat ( files [ pi ], "]/" ) ; + if ( node->getChild(name, 1) != 0 ) { + strcat ( files [ pi ], "[" ) ; + strcat ( files [ pi ], sindex ) ; + strcat ( files [ pi ], "]" ) ; + } + strcat ( files [ pi ], "/" ) ; values[ pi ] = new char[ 2 ] ; } else { dflag[ pi ] = 0 ;