diff --git a/common/eda_text.cpp b/common/eda_text.cpp index e52c3a6a28..a8b148f99f 100644 --- a/common/eda_text.cpp +++ b/common/eda_text.cpp @@ -630,7 +630,7 @@ static struct EDA_TEXT_DESC propMgr.AddProperty( new PROPERTY( _( "Text" ), &EDA_TEXT::SetText, &EDA_TEXT::GetText ) ); propMgr.AddProperty( new PROPERTY( _( "Thickness" ), - &EDA_TEXT::SetThickness, &EDA_TEXT::GetThickness, PROPERTY_DISPLAY::DISTANCE ) ); + &EDA_TEXT::SetTextThickness, &EDA_TEXT::GetTextThickness, PROPERTY_DISPLAY::DISTANCE ) ); propMgr.AddProperty( new PROPERTY( _( "Italic" ), &EDA_TEXT::SetItalic, &EDA_TEXT::IsItalic ) ); propMgr.AddProperty( new PROPERTY( _( "Bold" ), diff --git a/eeschema/lib_arc.h b/eeschema/lib_arc.h index ef1d6de2ab..f598d2be68 100644 --- a/eeschema/lib_arc.h +++ b/eeschema/lib_arc.h @@ -87,7 +87,7 @@ public: void MoveTo( const wxPoint& aPosition ) override; - const wxPoint GetPosition() const override { return m_Pos; } + wxPoint GetPosition() const override { return m_Pos; } void MirrorHorizontal( const wxPoint& aCenter ) override; void MirrorVertical( const wxPoint& aCenter ) override; diff --git a/eeschema/lib_bezier.cpp b/eeschema/lib_bezier.cpp index 526f9c121c..3f8b1a8658 100644 --- a/eeschema/lib_bezier.cpp +++ b/eeschema/lib_bezier.cpp @@ -351,7 +351,7 @@ void LIB_BEZIER::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ) override; - const wxPoint GetPosition() const override { return m_pos; } + wxPoint GetPosition() const override { return m_pos; } void SetPosition( const wxPoint& aPosition ) override { m_pos = aPosition; } bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override; diff --git a/eeschema/sch_bus_entry.h b/eeschema/sch_bus_entry.h index 4729aa31ab..00141dfbd8 100644 --- a/eeschema/sch_bus_entry.h +++ b/eeschema/sch_bus_entry.h @@ -107,7 +107,7 @@ public: void GetConnectionPoints( std::vector< wxPoint >& aPoints ) const override; - const wxPoint GetPosition() const override { return m_pos; } + wxPoint GetPosition() const override { return m_pos; } void SetPosition( const wxPoint& aPosition ) override { m_pos = aPosition; } bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override; diff --git a/eeschema/sch_component.h b/eeschema/sch_component.h index 64516ec22c..21ac625edc 100644 --- a/eeschema/sch_component.h +++ b/eeschema/sch_component.h @@ -649,7 +649,7 @@ public: bool IsReplaceable() const override { return true; } - const wxPoint GetPosition() const override { return m_Pos; } + wxPoint GetPosition() const override { return m_Pos; } void SetPosition( const wxPoint& aPosition ) override { Move( aPosition - m_Pos ); } bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override; diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index 917445f0d9..3bf524b238 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -576,7 +576,7 @@ void SCH_FIELD::SetPosition( const wxPoint& aPosition ) } -const wxPoint SCH_FIELD::GetPosition() const +wxPoint SCH_FIELD::GetPosition() const { if( m_Parent && m_Parent->Type() == SCH_COMPONENT_T ) { diff --git a/eeschema/sch_field.h b/eeschema/sch_field.h index a3da15c63d..168de27f67 100644 --- a/eeschema/sch_field.h +++ b/eeschema/sch_field.h @@ -187,7 +187,7 @@ public: wxPoint GetLibPosition() const { return EDA_TEXT::GetTextPos(); } - const wxPoint GetPosition() const override; + wxPoint GetPosition() const override; void SetPosition( const wxPoint& aPosition ) override; wxPoint GetParentPosition() const; diff --git a/eeschema/sch_item.h b/eeschema/sch_item.h index b1190b2518..7eb1a44eb0 100644 --- a/eeschema/sch_item.h +++ b/eeschema/sch_item.h @@ -136,7 +136,7 @@ public: || ( m_pos == rhs.m_pos && m_item < rhs.m_item ) ); } - const wxPoint GetPosition() const { return m_pos; } + wxPoint GetPosition() const { return m_pos; } EDA_ITEM* GetItem() const { return m_item; } const EDA_ITEM* GetParent() const { return m_parent; } DANGLING_END_T GetType() const { return m_type; } diff --git a/eeschema/sch_junction.h b/eeschema/sch_junction.h index f94094d006..9743ae5341 100644 --- a/eeschema/sch_junction.h +++ b/eeschema/sch_junction.h @@ -94,7 +94,7 @@ public: void GetNetListItem( NETLIST_OBJECT_LIST& aNetListItems, SCH_SHEET_PATH* aSheetPath ) override; - const wxPoint GetPosition() const override { return m_pos; } + wxPoint GetPosition() const override { return m_pos; } void SetPosition( const wxPoint& aPosition ) override { m_pos = aPosition; } int GetDiameter() const { return m_diameter; } diff --git a/eeschema/sch_line.h b/eeschema/sch_line.h index 5f479ad66b..4a561da7cc 100644 --- a/eeschema/sch_line.h +++ b/eeschema/sch_line.h @@ -207,7 +207,7 @@ public: bool operator <( const SCH_ITEM& aItem ) const override; - const wxPoint GetPosition() const override { return m_start; } + wxPoint GetPosition() const override { return m_start; } void SetPosition( const wxPoint& aPosition ) override; bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override; diff --git a/eeschema/sch_marker.h b/eeschema/sch_marker.h index b427088460..f39f2efb19 100644 --- a/eeschema/sch_marker.h +++ b/eeschema/sch_marker.h @@ -98,7 +98,7 @@ public: BITMAP_DEF GetMenuImage() const override; - const wxPoint GetPosition() const override { return m_Pos; } + wxPoint GetPosition() const override { return m_Pos; } void SetPosition( const wxPoint& aPosition ) override { m_Pos = aPosition; } bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override; diff --git a/eeschema/sch_no_connect.h b/eeschema/sch_no_connect.h index dcd017cf29..fe2d510975 100644 --- a/eeschema/sch_no_connect.h +++ b/eeschema/sch_no_connect.h @@ -105,7 +105,7 @@ public: void GetNetListItem( NETLIST_OBJECT_LIST& aNetListItems, SCH_SHEET_PATH* aSheetPath ) override; - const wxPoint GetPosition() const override { return m_pos; } + wxPoint GetPosition() const override { return m_pos; } void SetPosition( const wxPoint& aPosition ) override { m_pos = aPosition; } bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override; diff --git a/eeschema/sch_pin.h b/eeschema/sch_pin.h index 60fbdd9af0..b1a6ad04c3 100644 --- a/eeschema/sch_pin.h +++ b/eeschema/sch_pin.h @@ -78,7 +78,7 @@ public: void Rotate( wxPoint aPosition ) override {} - const wxPoint GetPosition() const override { return GetTransformedPosition(); } + wxPoint GetPosition() const override { return GetTransformedPosition(); } const wxPoint GetLocalPosition() const { return m_position; } void SetPosition( const wxPoint& aPosition ) override { m_position = aPosition; } diff --git a/eeschema/sch_sheet.h b/eeschema/sch_sheet.h index 06cd080f23..150b1b574e 100644 --- a/eeschema/sch_sheet.h +++ b/eeschema/sch_sheet.h @@ -567,7 +567,7 @@ public: void ViewGetLayers( int aLayers[], int& aCount ) const override; - const wxPoint GetPosition() const override { return m_pos; } + wxPoint GetPosition() const override { return m_pos; } void SetPosition( const wxPoint& aPosition ) override; bool HitTest( const wxPoint& aPosition, int aAccuracy ) const override; diff --git a/eeschema/sch_text.h b/eeschema/sch_text.h index f90a4cf24c..58937ff3fc 100644 --- a/eeschema/sch_text.h +++ b/eeschema/sch_text.h @@ -310,7 +310,7 @@ public: void GetNetListItem( NETLIST_OBJECT_LIST& aNetListItems, SCH_SHEET_PATH* aSheetPath ) override; - const wxPoint GetPosition() const override { return EDA_TEXT::GetTextPos(); } + wxPoint GetPosition() const override { return EDA_TEXT::GetTextPos(); } void SetPosition( const wxPoint& aPosition ) override { EDA_TEXT::SetTextPos( aPosition ); } bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override; diff --git a/gerbview/gerber_draw_item.h b/gerbview/gerber_draw_item.h index dc33d57b33..2446742880 100644 --- a/gerbview/gerber_draw_item.h +++ b/gerbview/gerber_draw_item.h @@ -194,7 +194,7 @@ public: * @return const wxPoint& - The position of this object. * This function exists mainly to satisfy the virtual GetPosition() in parent class */ - const wxPoint GetPosition() const override { return m_Start; } + wxPoint GetPosition() const override { return m_Start; } void SetPosition( const wxPoint& aPos ) { m_Start = aPos; } /** diff --git a/include/base_struct.h b/include/base_struct.h index e489fccf49..a10047d83b 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -334,7 +334,7 @@ public: */ virtual const EDA_RECT GetBoundingBox() const; - virtual const wxPoint GetPosition() const { return wxPoint(); } + virtual wxPoint GetPosition() const { return wxPoint(); } /** * Function GetFocusPosition diff --git a/include/class_board_item.h b/include/class_board_item.h index f70d838f92..49e0482a7e 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -97,9 +97,6 @@ public: // Do not create a copy constructor & operator=. // The ones generated by the compiler are adequate. - - virtual wxPoint GetPosition() const = 0; - int GetX() const { wxPoint p = GetPosition(); diff --git a/include/ws_draw_item.h b/include/ws_draw_item.h index 641fe320cc..3a9bb2fcbd 100644 --- a/include/ws_draw_item.h +++ b/include/ws_draw_item.h @@ -130,7 +130,7 @@ public: const wxPoint& GetEnd() const { return m_end; } void SetEnd( wxPoint aPos ) override { m_end = aPos; } - const wxPoint GetPosition() const override { return GetStart(); } + wxPoint GetPosition() const override { return GetStart(); } void SetPosition( wxPoint aPos ) override { SetStart( aPos ); } const EDA_RECT GetBoundingBox() const override; @@ -170,7 +170,7 @@ public: // Accessors: SHAPE_POLY_SET& GetPolygons() { return m_Polygons; } - const wxPoint GetPosition() const override { return m_pos; } + wxPoint GetPosition() const override { return m_pos; } void SetPosition( wxPoint aPos ) override; const EDA_RECT GetBoundingBox() const override; @@ -210,7 +210,7 @@ public: const wxPoint& GetEnd() const { return m_end; } void SetEnd( wxPoint aPos ) override { m_end = aPos; } - const wxPoint GetPosition() const override { return GetStart(); } + wxPoint GetPosition() const override { return GetStart(); } void SetPosition( wxPoint aPos ) override { SetStart( aPos ); } void PrintWsItem( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override; @@ -252,7 +252,7 @@ public: void SetMarkerPos( wxPoint aPos ) { m_markerPos = aPos; } double GetMarkerSize() const { return m_markerSize; } - const wxPoint GetPosition() const override { return wxPoint( 0, 0 ); } + wxPoint GetPosition() const override { return wxPoint( 0, 0 ); } void SetPosition( wxPoint aPos ) override { /* do nothing */ } void PrintWsItem( RENDER_SETTINGS* , const wxPoint& ) override { /* do nothing */ } @@ -295,7 +295,7 @@ public: EDA_TEXT::SetTextAngle( NormalizeAngle360Min( aAngle ) ); } - const wxPoint GetPosition() const override { return GetTextPos(); } + wxPoint GetPosition() const override { return GetTextPos(); } void SetPosition( wxPoint aPos ) override { SetTextPos( aPos ); } const EDA_RECT GetBoundingBox() const override; @@ -325,7 +325,7 @@ public: virtual wxString GetClass() const override { return wxT( "WS_DRAW_ITEM_BITMAP" ); } - const wxPoint GetPosition() const override { return m_pos; } + wxPoint GetPosition() const override { return m_pos; } void SetPosition( wxPoint aPos ) override { m_pos = aPos; } void PrintWsItem( RENDER_SETTINGS* aSettings, const wxPoint& aOffset ) override; diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index c7ad9410de..f6f43de147 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -72,6 +72,11 @@ public: // pure virtuals: void SetPosition( const wxPoint& ) override {} + wxPoint GetPosition() const override { + return wxPoint(0, 0); + } + + #if defined(DEBUG) void Show( int , std::ostream& ) const override {} #endif diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index e215c159c8..824708d5f9 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -896,7 +896,7 @@ void VIA::SwapData( BOARD_ITEM* aImage ) } -const wxPoint ARC::GetPosition() const +wxPoint ARC::GetPosition() const { auto center = GetArcCenter( VECTOR2I( m_Start ), VECTOR2I( m_Mid ), VECTOR2I( m_End ) ); return wxPoint( center.x, center.y ); diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 0a60840f14..f71dc4c5b4 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -298,7 +298,7 @@ public: m_Start = aPos; } - virtual const wxPoint GetPosition() const override; + virtual wxPoint GetPosition() const override; double GetRadius() const; double GetAngle() const; @@ -408,7 +408,7 @@ public: */ void SanitizeLayers(); - const wxPoint GetPosition() const override { return m_Start; } + wxPoint GetPosition() const override { return m_Start; } void SetPosition( const wxPoint& aPoint ) override { m_Start = aPoint; m_End = aPoint; } void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ) override;