diff --git a/eeschema/sch_label.h b/eeschema/sch_label.h index f2151b1e65..7b90d3f142 100644 --- a/eeschema/sch_label.h +++ b/eeschema/sch_label.h @@ -48,6 +48,31 @@ public: void SwapData( SCH_ITEM* aItem ) override; + bool CanConnect( const SCH_ITEM* aItem ) const override + { + switch( aItem->Type() ) + { + case SCH_LINE_T: + return aItem->GetLayer() == LAYER_WIRE || aItem->GetLayer() == LAYER_BUS; + + case SCH_BUS_WIRE_ENTRY_T: + return true; + + case SCH_SYMBOL_T: + return true; + + case SCH_LABEL_T: + case SCH_GLOBAL_LABEL_T: + case SCH_HIER_LABEL_T: + case SCH_DIRECTIVE_LABEL_T: + case SCH_SHEET_PIN_T: + return true; + + default: + return false; + } + } + LABEL_FLAG_SHAPE GetShape() const override { return m_shape; } void SetShape( LABEL_FLAG_SHAPE aShape ) override { m_shape = aShape; } @@ -176,12 +201,6 @@ public: bool IsConnectable() const override { return true; } - bool CanConnect( const SCH_ITEM* aItem ) const override - { - return aItem->Type() == SCH_LINE_T && - ( aItem->GetLayer() == LAYER_WIRE || aItem->GetLayer() == LAYER_BUS ); - } - wxString GetSelectMenuText( EDA_UNITS aUnits ) const override; BITMAPS GetMenuImage() const override; @@ -246,12 +265,6 @@ public: bool IsConnectable() const override { return true; } - bool CanConnect( const SCH_ITEM* aItem ) const override - { - return aItem->Type() == SCH_LINE_T && - ( aItem->GetLayer() == LAYER_WIRE || aItem->GetLayer() == LAYER_BUS ); - } - private: int m_pinLength; int m_symbolSize; @@ -300,31 +313,6 @@ public: bool IsConnectable() const override { return true; } - bool CanConnect( const SCH_ITEM* aItem ) const override - { - switch( aItem->Type() ) - { - case SCH_LINE_T: - return aItem->GetLayer() == LAYER_WIRE || aItem->GetLayer() == LAYER_BUS; - - case SCH_BUS_WIRE_ENTRY_T: - return true; - - case SCH_SYMBOL_T: - return true; - - case SCH_LABEL_T: - case SCH_GLOBAL_LABEL_T: - case SCH_HIER_LABEL_T: - case SCH_DIRECTIVE_LABEL_T: - case SCH_SHEET_PIN_T: - return true; - - default: - return false; - } - } - void ViewGetLayers( int aLayers[], int& aCount ) const override; wxString GetSelectMenuText( EDA_UNITS aUnits ) const override; @@ -377,12 +365,6 @@ public: bool IsConnectable() const override { return true; } - bool CanConnect( const SCH_ITEM* aItem ) const override - { - return aItem->Type() == SCH_LINE_T && - ( aItem->GetLayer() == LAYER_WIRE || aItem->GetLayer() == LAYER_BUS ); - } - wxString GetSelectMenuText( EDA_UNITS aUnits ) const override; BITMAPS GetMenuImage() const override;