diff --git a/eeschema/sch_tablecell.h b/eeschema/sch_tablecell.h index f7c746f2c2..4c5712c8e7 100644 --- a/eeschema/sch_tablecell.h +++ b/eeschema/sch_tablecell.h @@ -50,6 +50,11 @@ public: return new SCH_TABLECELL( *this ); } + EDA_GROUP* GetParentGroup() const override + { + return GetParent()->GetParentGroup(); + } + int GetRow() const; int GetColumn() const; diff --git a/include/eda_item.h b/include/eda_item.h index 0423b8a3bf..90b9ee5064 100644 --- a/include/eda_item.h +++ b/include/eda_item.h @@ -111,7 +111,7 @@ public: virtual void SetParent( EDA_ITEM* aParent ) { m_parent = aParent; } virtual void SetParentGroup( EDA_GROUP* aGroup ) { m_group = aGroup; } - EDA_GROUP* GetParentGroup() const { return m_group; } + virtual EDA_GROUP* GetParentGroup() const { return m_group; } virtual bool IsLocked() const { return false; } virtual void SetLocked( bool aLocked ) {} diff --git a/pcbnew/pcb_tablecell.h b/pcbnew/pcb_tablecell.h index 878d72bbe3..56da278c29 100644 --- a/pcbnew/pcb_tablecell.h +++ b/pcbnew/pcb_tablecell.h @@ -26,6 +26,7 @@ #include +#include class PCB_TABLECELL : public PCB_TEXTBOX @@ -53,6 +54,11 @@ public: return new PCB_TABLECELL( *this ); } + EDA_GROUP* GetParentGroup() const override + { + return GetParent()->GetParentGroup(); + } + int GetRow() const; int GetColumn() const;