Edit One Field improvements.
1) Accept <enter> as OK if the multiline textbox isn't shown.
2) Focus and select all in first control if multiline textbox isn't shown.
3) Make title be title caps ("Edit Sheet name Field" looked dorky).
Fixes https://gitlab.com/kicad/code/kicad/issues/7940
This commit is contained in:
@@ -212,6 +212,25 @@ wxString UnescapeString( const wxString& aSource )
|
||||
}
|
||||
|
||||
|
||||
wxString TitleCaps( const wxString& aString )
|
||||
{
|
||||
wxArrayString words;
|
||||
wxString result;
|
||||
|
||||
wxStringSplit( aString, words, ' ' );
|
||||
|
||||
for( const wxString& word : words )
|
||||
{
|
||||
if( !result.IsEmpty() )
|
||||
result += wxT( " " );
|
||||
|
||||
result += word.Capitalize();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
int ReadDelimitedText( wxString* aDest, const char* aSource )
|
||||
{
|
||||
std::string utf8; // utf8 but without escapes and quotes.
|
||||
|
||||
Reference in New Issue
Block a user