diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 9ce99459b2..33e9e038a5 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -489,11 +489,6 @@ void EDA_DRAW_FRAME::SetToolID( int aId, int aCursor, const wxString& aToolMsg ) } -void EDA_DRAW_FRAME::OnGrid( int grid_type ) -{ -} - - wxPoint EDA_DRAW_FRAME::GetGridPosition( const wxPoint& aPosition ) const { wxPoint pos = aPosition; diff --git a/include/wxstruct.h b/include/wxstruct.h index ad5230d8db..c381445daf 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -665,7 +665,6 @@ public: void OnEraseBackground( wxEraseEvent& SizeEvent ); virtual void OnZoom( wxCommandEvent& event ); - void OnGrid( int grid_type ); /** * Function RedrawScreen diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index 92c95cd170..91718e5915 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -30,6 +30,7 @@ #include #include #include +#include // Functions defined in block_module_editor, but used here @@ -877,3 +878,9 @@ void FOOTPRINT_EDIT_FRAME::OnVerticalToolbar( wxCommandEvent& aEvent ) SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString ); } } + +EDA_COLOR_T FOOTPRINT_EDIT_FRAME::GetGridColor() const +{ + return g_ColorsSettings.GetItemColor( GRID_VISIBLE ); +} + diff --git a/pcbnew/module_editor_frame.h b/pcbnew/module_editor_frame.h index 870d988e4c..fe51bfe96a 100644 --- a/pcbnew/module_editor_frame.h +++ b/pcbnew/module_editor_frame.h @@ -375,6 +375,8 @@ public: void Select_Active_Library(); + virtual EDA_COLOR_T GetGridColor( void ) const; + DECLARE_EVENT_TABLE() protected: diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 2fe8229a9e..fe81b080e9 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -45,6 +45,7 @@ #include #include +#include /** @@ -697,3 +698,9 @@ void FOOTPRINT_VIEWER_FRAME::Update3D_Frame( bool aForceReloadFootprint ) m_Draw3DFrame->NewDisplay(); } } + +EDA_COLOR_T FOOTPRINT_VIEWER_FRAME::GetGridColor() const +{ + return g_ColorsSettings.GetItemColor( GRID_VISIBLE ); +} + diff --git a/pcbnew/modview_frame.h b/pcbnew/modview_frame.h index 4186a44b7c..b07a9002b7 100644 --- a/pcbnew/modview_frame.h +++ b/pcbnew/modview_frame.h @@ -86,6 +86,7 @@ public: wxString& GetSelectedFootprint( void ) const { return m_selectedFootprintName; } const wxString GetSelectedLibraryFullName( void ); + virtual EDA_COLOR_T GetGridColor( void ) const; private: void OnSize( wxSizeEvent& event );