Commit 65b7f23d authored by Lorenzo Marcantonio's avatar Lorenzo Marcantonio

Set grid color for module editor and viewer (closes #1167884)

Also removed EDA_DRAW_FRAME::OnGrid which was totally dead (empty and unused)
parent d5fff4a6
...@@ -489,11 +489,6 @@ void EDA_DRAW_FRAME::SetToolID( int aId, int aCursor, const wxString& aToolMsg ) ...@@ -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 EDA_DRAW_FRAME::GetGridPosition( const wxPoint& aPosition ) const
{ {
wxPoint pos = aPosition; wxPoint pos = aPosition;
......
...@@ -665,7 +665,6 @@ public: ...@@ -665,7 +665,6 @@ public:
void OnEraseBackground( wxEraseEvent& SizeEvent ); void OnEraseBackground( wxEraseEvent& SizeEvent );
virtual void OnZoom( wxCommandEvent& event ); virtual void OnZoom( wxCommandEvent& event );
void OnGrid( int grid_type );
/** /**
* Function RedrawScreen * Function RedrawScreen
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <wildcards_and_files_ext.h> #include <wildcards_and_files_ext.h>
#include <menus_helpers.h> #include <menus_helpers.h>
#include <footprint_wizard_frame.h> #include <footprint_wizard_frame.h>
#include <pcbnew_config.h>
// Functions defined in block_module_editor, but used here // Functions defined in block_module_editor, but used here
...@@ -877,3 +878,9 @@ void FOOTPRINT_EDIT_FRAME::OnVerticalToolbar( wxCommandEvent& aEvent ) ...@@ -877,3 +878,9 @@ void FOOTPRINT_EDIT_FRAME::OnVerticalToolbar( wxCommandEvent& aEvent )
SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString ); SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString );
} }
} }
EDA_COLOR_T FOOTPRINT_EDIT_FRAME::GetGridColor() const
{
return g_ColorsSettings.GetItemColor( GRID_VISIBLE );
}
...@@ -375,6 +375,8 @@ public: ...@@ -375,6 +375,8 @@ public:
void Select_Active_Library(); void Select_Active_Library();
virtual EDA_COLOR_T GetGridColor( void ) const;
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
protected: protected:
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include <hotkeys.h> #include <hotkeys.h>
#include <wildcards_and_files_ext.h> #include <wildcards_and_files_ext.h>
#include <pcbnew_config.h>
/** /**
...@@ -697,3 +698,9 @@ void FOOTPRINT_VIEWER_FRAME::Update3D_Frame( bool aForceReloadFootprint ) ...@@ -697,3 +698,9 @@ void FOOTPRINT_VIEWER_FRAME::Update3D_Frame( bool aForceReloadFootprint )
m_Draw3DFrame->NewDisplay(); m_Draw3DFrame->NewDisplay();
} }
} }
EDA_COLOR_T FOOTPRINT_VIEWER_FRAME::GetGridColor() const
{
return g_ColorsSettings.GetItemColor( GRID_VISIBLE );
}
...@@ -86,6 +86,7 @@ public: ...@@ -86,6 +86,7 @@ public:
wxString& GetSelectedFootprint( void ) const { return m_selectedFootprintName; } wxString& GetSelectedFootprint( void ) const { return m_selectedFootprintName; }
const wxString GetSelectedLibraryFullName( void ); const wxString GetSelectedLibraryFullName( void );
virtual EDA_COLOR_T GetGridColor( void ) const;
private: private:
void OnSize( wxSizeEvent& event ); void OnSize( wxSizeEvent& event );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment