Recognize ' ', '}', ')' as terminators of overbar in conversion

Fixes bug 3 in https://gitlab.com/kicad/code/kicad/-/issues/8591.
This commit is contained in:
Mikolaj Wielgus 2021-06-15 00:11:41 +02:00 committed by Jeff Young
parent e401a392c1
commit 9a42ec753f
1 changed files with 7 additions and 1 deletions

View File

@ -34,7 +34,7 @@
/** /**
* Illegal file name characters used to insure file names will be valid on all supported * Illegal file name characters used to ensure file names will be valid on all supported
* platforms. This is the list of illegal file name characters for Windows which includes * platforms. This is the list of illegal file name characters for Windows which includes
* the illegal file name characters for Linux and OSX. * the illegal file name characters for Linux and OSX.
*/ */
@ -86,6 +86,12 @@ wxString ConvertToNewOverbarNotation( const wxString& aOldStr )
continue; continue;
} }
} }
else if( ( *chIt == ' ' || *chIt == '}' || *chIt == ')' ) && inOverbar )
{
// Spaces were used to terminate overbar as well
newStr << "}";
inOverbar = false;
}
newStr << *chIt; newStr << *chIt;
} }