Make option not uppercasing component names. I'm so bored with my Eeschema is convert ADuC, Si, component names to ADUC, SI etc., so I contribute this patch so anyone now may keep components
This commit is contained in:
parent
185a2544b5
commit
15652d8d34
|
@ -19,6 +19,9 @@ option(KICAD_MINIZIP "enable/disable building minizip (default ON)" ON)
|
||||||
option(wxUSE_UNICODE "enable/disable building unicode (default OFF)")
|
option(wxUSE_UNICODE "enable/disable building unicode (default OFF)")
|
||||||
option(KICAD_GOST "enable/disable building using GOST notation for multiple gates per package (default OFF)")
|
option(KICAD_GOST "enable/disable building using GOST notation for multiple gates per package (default OFF)")
|
||||||
|
|
||||||
|
#for those who bored with uppercase
|
||||||
|
option(KICAD_KEEPCASE "turn-off automatic component name conversion to uppercase if selected")
|
||||||
|
|
||||||
option(USE_WX_ZOOM "Use wxDC to perform zooming (default OFF). Warning, this is experimental" )
|
option(USE_WX_ZOOM "Use wxDC to perform zooming (default OFF). Warning, this is experimental" )
|
||||||
|
|
||||||
option(USE_WX_GRAPHICS_CONTEXT
|
option(USE_WX_GRAPHICS_CONTEXT
|
||||||
|
@ -53,6 +56,10 @@ if(KICAD_GOST)
|
||||||
add_definitions(-DKICAD_GOST)
|
add_definitions(-DKICAD_GOST)
|
||||||
endif(KICAD_GOST)
|
endif(KICAD_GOST)
|
||||||
|
|
||||||
|
if(KICAD_KEEPCASE)
|
||||||
|
add_definitions(-DKICAD_KEEPCASE)
|
||||||
|
endif(KICAD_KEEPCASE)
|
||||||
|
|
||||||
if(USE_WX_ZOOM)
|
if(USE_WX_ZOOM)
|
||||||
add_definitions(-DUSE_WX_ZOOM)
|
add_definitions(-DUSE_WX_ZOOM)
|
||||||
endif(USE_WX_ZOOM)
|
endif(USE_WX_ZOOM)
|
||||||
|
|
|
@ -169,6 +169,10 @@ Require on locale utf8 for build the KiCad with cyrillic fonts support.
|
||||||
-DKICAD_GOST=ON
|
-DKICAD_GOST=ON
|
||||||
Build the KiCad with russian GOST support.
|
Build the KiCad with russian GOST support.
|
||||||
|
|
||||||
|
-DKICAD_KEEPCASE=ON
|
||||||
|
Build the KiCad with no component name conversion to uppercase (if you want your
|
||||||
|
ADuC.../Si.../bq... components named as just so).
|
||||||
|
|
||||||
-DCMAKE_CXX_FLAGS=<some extra flags>
|
-DCMAKE_CXX_FLAGS=<some extra flags>
|
||||||
Extra flags for the c++ compiler for your system required.
|
Extra flags for the c++ compiler for your system required.
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,13 @@ public:
|
||||||
* @param aMakeUpperCase - Force entry names to upper case.
|
* @param aMakeUpperCase - Force entry names to upper case.
|
||||||
*/
|
*/
|
||||||
void GetEntryNames( wxArrayString& aNames, bool aSort = true,
|
void GetEntryNames( wxArrayString& aNames, bool aSort = true,
|
||||||
bool aMakeUpperCase = true );
|
bool aMakeUpperCase =
|
||||||
|
#ifndef KICAD_KEEPCASE
|
||||||
|
true
|
||||||
|
#else
|
||||||
|
false
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load string array with entry names matching name and/or key word.
|
* Load string array with entry names matching name and/or key word.
|
||||||
|
|
|
@ -35,7 +35,9 @@ wxString DataBaseGetName( WinEDA_DrawFrame* frame, wxString& Keys,
|
||||||
wxArrayString nameList;
|
wxArrayString nameList;
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
||||||
|
#ifndef KICAD_KEEPCASE
|
||||||
BufName.MakeUpper();
|
BufName.MakeUpper();
|
||||||
|
#endif
|
||||||
Keys.MakeUpper();
|
Keys.MakeUpper();
|
||||||
|
|
||||||
/* Review the list of libraries for counting. */
|
/* Review the list of libraries for counting. */
|
||||||
|
|
|
@ -148,7 +148,9 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions()
|
||||||
{
|
{
|
||||||
wxString newname = chipnameTextCtrl->GetValue();
|
wxString newname = chipnameTextCtrl->GetValue();
|
||||||
|
|
||||||
|
#ifndef KICAD_KEEPCASE
|
||||||
newname.MakeUpper();
|
newname.MakeUpper();
|
||||||
|
#endif
|
||||||
newname.Replace( wxT( " " ), wxT( "_" ) );
|
newname.Replace( wxT( " " ), wxT( "_" ) );
|
||||||
|
|
||||||
if( newname.IsEmpty() )
|
if( newname.IsEmpty() )
|
||||||
|
|
|
@ -124,7 +124,9 @@ SCH_COMPONENT* WinEDA_SchematicFrame::Load_Component( wxDC* DC,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef KICAD_KEEPCASE
|
||||||
Name.MakeUpper();
|
Name.MakeUpper();
|
||||||
|
#endif
|
||||||
|
|
||||||
if( Name.GetChar( 0 ) == '=' )
|
if( Name.GetChar( 0 ) == '=' )
|
||||||
{
|
{
|
||||||
|
|
|
@ -497,7 +497,11 @@ lost!\n\nClear the current component from the screen?" ) ) )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef KICAD_KEEPCASE
|
||||||
name = dlg.GetName().MakeUpper();
|
name = dlg.GetName().MakeUpper();
|
||||||
|
#else
|
||||||
|
name = dlg.GetName();
|
||||||
|
#endif
|
||||||
name.Replace( wxT( " " ), wxT( "_" ) );
|
name.Replace( wxT( " " ), wxT( "_" ) );
|
||||||
|
|
||||||
/* Test if there a component with this name already. */
|
/* Test if there a component with this name already. */
|
||||||
|
|
Loading…
Reference in New Issue