Finish off "busses" -> "buses".

Fixes https://gitlab.com/kicad/code/kicad/issues/4144
This commit is contained in:
Jeff Young 2020-04-02 18:03:53 +01:00
parent 9ab2fcda77
commit 20c00cbb21
10 changed files with 22 additions and 22 deletions

View File

@ -303,7 +303,7 @@ bool SCH_EDIT_FRAME::BreakSegment( SCH_LINE* aSegment, const wxPoint& aPoint,
bool SCH_EDIT_FRAME::BreakSegments( const wxPoint& aPoint, SCH_SCREEN* aScreen ) bool SCH_EDIT_FRAME::BreakSegments( const wxPoint& aPoint, SCH_SCREEN* aScreen )
{ {
static const KICAD_T wiresAndBusses[] = { SCH_LINE_LOCATE_WIRE_T, SCH_LINE_LOCATE_BUS_T, EOT }; static const KICAD_T wiresAndBuses[] = { SCH_LINE_LOCATE_WIRE_T, SCH_LINE_LOCATE_BUS_T, EOT };
if( aScreen == nullptr ) if( aScreen == nullptr )
aScreen = GetScreen(); aScreen = GetScreen();
@ -314,7 +314,7 @@ bool SCH_EDIT_FRAME::BreakSegments( const wxPoint& aPoint, SCH_SCREEN* aScreen )
for( auto item : aScreen->Items().Overlapping( SCH_LINE_T, aPoint ) ) for( auto item : aScreen->Items().Overlapping( SCH_LINE_T, aPoint ) )
{ {
if( item->IsType( wiresAndBusses ) ) if( item->IsType( wiresAndBuses ) )
wires.push_back( static_cast<SCH_LINE*>( item ) ); wires.push_back( static_cast<SCH_LINE*>( item ) );
} }
@ -356,7 +356,7 @@ void SCH_EDIT_FRAME::DeleteJunction( SCH_ITEM* aJunction, bool aAppend )
SCH_SCREEN* screen = GetScreen(); SCH_SCREEN* screen = GetScreen();
PICKED_ITEMS_LIST undoList; PICKED_ITEMS_LIST undoList;
EE_SELECTION_TOOL* selectionTool = m_toolManager->GetTool<EE_SELECTION_TOOL>(); EE_SELECTION_TOOL* selectionTool = m_toolManager->GetTool<EE_SELECTION_TOOL>();
KICAD_T wiresAndBusses[] = { SCH_LINE_LOCATE_WIRE_T, SCH_LINE_LOCATE_BUS_T, EOT }; KICAD_T wiresAndBuses[] = { SCH_LINE_LOCATE_WIRE_T, SCH_LINE_LOCATE_BUS_T, EOT };
auto remove_item = [ & ]( SCH_ITEM* aItem ) -> void auto remove_item = [ & ]( SCH_ITEM* aItem ) -> void
{ {
@ -375,7 +375,7 @@ void SCH_EDIT_FRAME::DeleteJunction( SCH_ITEM* aJunction, bool aAppend )
{ {
auto line = static_cast<SCH_LINE*>( item ); auto line = static_cast<SCH_LINE*>( item );
if( line->IsType( wiresAndBusses ) && line->IsEndPoint( aJunction->GetPosition() ) if( line->IsType( wiresAndBuses ) && line->IsEndPoint( aJunction->GetPosition() )
&& !( line->GetEditFlags() & STRUCT_DELETED ) ) && !( line->GetEditFlags() & STRUCT_DELETED ) )
lines.push_back( line ); lines.push_back( line );
} }

View File

@ -69,7 +69,7 @@ wxString ERC_ITEM::GetErrorText() const
case ERCE_BUS_LABEL_ERROR: case ERCE_BUS_LABEL_ERROR:
return wxString( _( "Label attached to bus item does not describe a bus" ) ); return wxString( _( "Label attached to bus item does not describe a bus" ) );
case ERCE_BUS_TO_BUS_CONFLICT: case ERCE_BUS_TO_BUS_CONFLICT:
return wxString( _( "Busses are graphically connected but share no bus members" ) ); return wxString( _( "Buses are graphically connected but share no bus members" ) );
case ERCE_BUS_TO_NET_CONFLICT: case ERCE_BUS_TO_NET_CONFLICT:
return wxString( _( "Invalid connection between bus and net items" ) ); return wxString( _( "Invalid connection between bus and net items" ) );
case ERCE_GLOBLABEL: case ERCE_GLOBLABEL:

View File

@ -50,7 +50,7 @@ class ERC_SETTINGS;
///< when repeating a pin ///< when repeating a pin
#define TXT_MARGIN 4 #define TXT_MARGIN 4
///< The thickness to draw busses that do not have a specific width ///< The thickness to draw buses that do not have a specific width
///< (can be changed in preference menu) ///< (can be changed in preference menu)
#define DEFAULTBUSTHICKNESS 12 #define DEFAULTBUSTHICKNESS 12
@ -123,13 +123,13 @@ int GetDefaultTextSize();
void SetDefaultTextSize( int aSize ); void SetDefaultTextSize( int aSize );
/** /**
* Amount to offset text above/below wires & busses. Expressed as a ratio of the text size. * Amount to offset text above/below wires & buses. Expressed as a ratio of the text size.
*/ */
double GetTextOffsetRatio(); double GetTextOffsetRatio();
void SetTextOffsetRatio( double aOffsetRatio ); void SetTextOffsetRatio( double aOffsetRatio );
/** /**
* Default line thickness used to draw/plot busses. * Default line thickness used to draw/plot buses.
*/ */
int GetDefaultBusThickness(); int GetDefaultBusThickness();
void SetDefaultBusThickness( int aThickness ); void SetDefaultBusThickness( int aThickness );

View File

@ -710,7 +710,7 @@ void SCH_EAGLE_PLUGIN::loadSheet( wxXmlNode* aSheetNode, int aSheetIndex )
wxFileName fileName( fn ); wxFileName fileName( fn );
m_currentSheet->GetScreen()->SetFileName( fileName.GetFullPath() ); m_currentSheet->GetScreen()->SetFileName( fileName.GetFullPath() );
// Loop through all busses // Loop through all buses
// From the DTD: "Buses receive names which determine which signals they include. // From the DTD: "Buses receive names which determine which signals they include.
// A bus is a drawing object. It does not create any electrical connections. // A bus is a drawing object. It does not create any electrical connections.
// These are always created by means of the nets and their names." // These are always created by means of the nets and their names."

View File

@ -309,7 +309,7 @@ std::set<SCH_ITEM*> SCH_SCREEN::MarkConnections( SCH_LINE* aSegment )
for( auto item : Items().Overlapping( SCH_LINE_T, test_item->GetBoundingBox() ) ) for( auto item : Items().Overlapping( SCH_LINE_T, test_item->GetBoundingBox() ) )
{ {
// Skip connecting lines on different layers (e.g. busses) // Skip connecting lines on different layers (e.g. buses)
if( test_item->GetLayer() != item->GetLayer() ) if( test_item->GetLayer() != item->GetLayer() )
continue; continue;
@ -334,7 +334,7 @@ std::set<SCH_ITEM*> SCH_SCREEN::MarkConnections( SCH_LINE* aSegment )
bool SCH_SCREEN::IsJunctionNeeded( const wxPoint& aPosition, bool aNew ) bool SCH_SCREEN::IsJunctionNeeded( const wxPoint& aPosition, bool aNew )
{ {
enum { WIRES, BUSSES } layers; enum { WIRES, BUSES } layers;
bool has_nonparallel[ sizeof( layers ) ] = { false }; bool has_nonparallel[ sizeof( layers ) ] = { false };
int end_count[ sizeof( layers ) ] = { 0 }; int end_count[ sizeof( layers ) ] = { 0 };
@ -355,7 +355,7 @@ bool SCH_SCREEN::IsJunctionNeeded( const wxPoint& aPosition, bool aNew )
if( item->GetLayer() == LAYER_WIRE ) if( item->GetLayer() == LAYER_WIRE )
lines[WIRES].push_back( (SCH_LINE*) item ); lines[WIRES].push_back( (SCH_LINE*) item );
else if( item->GetLayer() == LAYER_BUS ) else if( item->GetLayer() == LAYER_BUS )
lines[BUSSES].push_back( (SCH_LINE*) item ); lines[BUSES].push_back( (SCH_LINE*) item );
} }
if( ( ( item->Type() == SCH_COMPONENT_T ) || ( item->Type() == SCH_SHEET_T ) ) if( ( ( item->Type() == SCH_COMPONENT_T ) || ( item->Type() == SCH_SHEET_T ) )
@ -363,7 +363,7 @@ bool SCH_SCREEN::IsJunctionNeeded( const wxPoint& aPosition, bool aNew )
pin_count++; pin_count++;
} }
for( int i : { WIRES, BUSSES } ) for( int i : { WIRES, BUSES } )
{ {
bool removed_overlapping = false; bool removed_overlapping = false;
bool mid_point = false; bool mid_point = false;
@ -409,7 +409,7 @@ bool SCH_SCREEN::IsJunctionNeeded( const wxPoint& aPosition, bool aNew )
return true; return true;
// Check for bus - bus junction requirements // Check for bus - bus junction requirements
if( has_nonparallel[BUSSES] && end_count[BUSSES] > 2 ) if( has_nonparallel[BUSES] && end_count[BUSES] > 2 )
return true; return true;
return false; return false;

View File

@ -600,7 +600,7 @@ TOOL_ACTION EE_ACTIONS::toggleHiddenPins( "eeschema.EditorControl.showHiddenPins
TOOL_ACTION EE_ACTIONS::toggleForceHV( "eeschema.EditorControl.forceHVLines", TOOL_ACTION EE_ACTIONS::toggleForceHV( "eeschema.EditorControl.forceHVLines",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Force H/V Wires and Busses" ), "", _( "Force H/V Wires and Buses" ), "",
lines90_xpm ); lines90_xpm );
@ -616,7 +616,7 @@ TOOL_ACTION EE_ACTIONS::drawWire( "eeschema.InteractiveDrawingLineWireBus.drawWi
_( "Add Wire" ), _( "Add a wire" ), _( "Add Wire" ), _( "Add a wire" ),
add_line_xpm, AF_ACTIVATE, (void*) LAYER_WIRE ); add_line_xpm, AF_ACTIVATE, (void*) LAYER_WIRE );
TOOL_ACTION EE_ACTIONS::drawBus( "eeschema.InteractiveDrawingLineWireBus.drawBusses", TOOL_ACTION EE_ACTIONS::drawBus( "eeschema.InteractiveDrawingLineWireBus.drawBuses",
AS_GLOBAL, AS_GLOBAL,
'B', LEGACY_HK_NAME( "Begin Bus" ), 'B', LEGACY_HK_NAME( "Begin Bus" ),
_( "Add Bus" ), _( "Add a bus" ), _( "Add Bus" ), _( "Add a bus" ),

View File

@ -833,9 +833,9 @@ int EE_SELECTION_TOOL::SelectNode( const TOOL_EVENT& aEvent )
int EE_SELECTION_TOOL::SelectConnection( const TOOL_EVENT& aEvent ) int EE_SELECTION_TOOL::SelectConnection( const TOOL_EVENT& aEvent )
{ {
static KICAD_T wiresAndBusses[] = { SCH_LINE_LOCATE_WIRE_T, SCH_LINE_LOCATE_BUS_T, EOT }; static KICAD_T wiresAndBuses[] = { SCH_LINE_LOCATE_WIRE_T, SCH_LINE_LOCATE_BUS_T, EOT };
RequestSelection( wiresAndBusses ); RequestSelection( wiresAndBuses );
if( m_selection.Empty() ) if( m_selection.Empty() )
return 0; return 0;

View File

@ -40,7 +40,7 @@ class EE_SELECTION_TOOL;
/** /**
* SCH_DRAWING_TOOLS * SCH_DRAWING_TOOLS
* *
* Tool responsible for drawing/placing items (symbols, wires, busses, labels, etc.) * Tool responsible for drawing/placing items (symbols, wires, buses, labels, etc.)
*/ */
class SCH_DRAWING_TOOLS : public EE_TOOL_BASE<SCH_EDIT_FRAME> class SCH_DRAWING_TOOLS : public EE_TOOL_BASE<SCH_EDIT_FRAME>

View File

@ -62,7 +62,7 @@ struct BUS_UNFOLDING_T
/** /**
* SCH_LINE_DRAWING_TOOL * SCH_LINE_DRAWING_TOOL
* *
* Tool responsible for drawing/placing items (symbols, wires, busses, labels, etc.) * Tool responsible for drawing/placing items (symbols, wires, buses, labels, etc.)
*/ */
class SCH_LINE_WIRE_BUS_TOOL : public EE_TOOL_BASE<SCH_EDIT_FRAME> class SCH_LINE_WIRE_BUS_TOOL : public EE_TOOL_BASE<SCH_EDIT_FRAME>

View File

@ -132,12 +132,12 @@ enum KICAD_T
SCH_FIELD_LOCATE_FOOTPRINT_T, SCH_FIELD_LOCATE_FOOTPRINT_T,
SCH_FIELD_LOCATE_DATASHEET_T, SCH_FIELD_LOCATE_DATASHEET_T,
// Same for picking wires and busses from SCH_LINE_T items // Same for picking wires and buses from SCH_LINE_T items
SCH_LINE_LOCATE_WIRE_T, SCH_LINE_LOCATE_WIRE_T,
SCH_LINE_LOCATE_BUS_T, SCH_LINE_LOCATE_BUS_T,
SCH_LINE_LOCATE_GRAPHIC_LINE_T, SCH_LINE_LOCATE_GRAPHIC_LINE_T,
// Same for picking labels attached to wires and/or busses // Same for picking labels attached to wires and/or buses
SCH_LABEL_LOCATE_WIRE_T, SCH_LABEL_LOCATE_WIRE_T,
SCH_LABEL_LOCATE_BUS_T, SCH_LABEL_LOCATE_BUS_T,