parent
241fc3166b
commit
c92181621e
|
@ -400,9 +400,16 @@ void SCH_CONNECTION::AppendDebugInfoToMsgPanel( MSG_PANEL_ITEMS& aList ) const
|
|||
|
||||
bool SCH_CONNECTION::IsBusLabel( const wxString& aLabel )
|
||||
{
|
||||
//return IsBusVectorLabel( aLabel ) || IsBusGroupLabel( aLabel );
|
||||
return IsBusVectorLabel( aLabel ) || IsBusGroupLabel( aLabel );
|
||||
}
|
||||
|
||||
|
||||
bool SCH_CONNECTION::MightBeBusLabel( const wxString& aLabel )
|
||||
{
|
||||
// Weak heuristic for performance reasons. Stronger test will be used for connectivity
|
||||
return aLabel.Contains( wxT( "[" ) ) || aLabel.Contains( wxT( "{" ) );
|
||||
wxString label = UnescapeString( aLabel );
|
||||
|
||||
return label.Contains( wxT( "[" ) ) || label.Contains( wxT( "{" ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -303,6 +303,15 @@ public:
|
|||
*/
|
||||
static bool IsBusLabel( const wxString& aLabel );
|
||||
|
||||
/**
|
||||
* Test if \a aLabel looks like a bus notation.
|
||||
* This check is much less expensive than IsBusLabel.
|
||||
*
|
||||
* @param aLabel A wxString object containing the label to test.
|
||||
* @return true if text might be a bus label
|
||||
*/
|
||||
static bool MightBeBusLabel( const wxString& aLabel );
|
||||
|
||||
/**
|
||||
* Test if \a aLabel has a bus vector notation (simple bus, e.g. A[7..0])
|
||||
*
|
||||
|
|
|
@ -523,12 +523,12 @@ bool SCH_SCREEN::IsTerminalPoint( const wxPoint& aPosition, int aLayer )
|
|||
|
||||
label = GetSheetLabel( aPosition );
|
||||
|
||||
if( label && conn.IsBusLabel( label->GetText() ) && label->IsConnected( aPosition ) )
|
||||
if( label && conn.MightBeBusLabel( label->GetText() ) && label->IsConnected( aPosition ) )
|
||||
return true;
|
||||
|
||||
text = GetLabel( aPosition );
|
||||
|
||||
if( text && conn.IsBusLabel( text->GetText() ) && text->IsConnected( aPosition )
|
||||
if( text && conn.MightBeBusLabel( text->GetText() ) && text->IsConnected( aPosition )
|
||||
&& (text->Type() != SCH_LABEL_T) )
|
||||
return true;
|
||||
|
||||
|
@ -559,12 +559,12 @@ bool SCH_SCREEN::IsTerminalPoint( const wxPoint& aPosition, int aLayer )
|
|||
|
||||
text = GetLabel( aPosition );
|
||||
|
||||
if( text && text->IsConnected( aPosition ) && !conn.IsBusLabel( text->GetText() ) )
|
||||
if( text && text->IsConnected( aPosition ) && !conn.MightBeBusLabel( text->GetText() ) )
|
||||
return true;
|
||||
|
||||
label = GetSheetLabel( aPosition );
|
||||
|
||||
if( label && label->IsConnected( aPosition ) && !conn.IsBusLabel( label->GetText() ) )
|
||||
if( label && label->IsConnected( aPosition ) && !conn.MightBeBusLabel( label->GetText() ) )
|
||||
return true;
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue