Remove dependence on LAYER_ID from EDA_DRAW_PANEL_GAL

This commit is contained in:
Jon Evans 2017-02-16 19:59:31 -05:00 committed by Maciej Suminski
parent a416f3a4e4
commit 9d68c970dc
3 changed files with 19 additions and 7 deletions

View File

@ -302,7 +302,7 @@ void EDA_DRAW_PANEL_GAL::StopDrawing()
}
void EDA_DRAW_PANEL_GAL::SetHighContrastLayer( LAYER_ID aLayer )
void EDA_DRAW_PANEL_GAL::SetHighContrastLayer( int aLayer )
{
// Set display settings for high contrast mode
KIGFX::RENDER_SETTINGS* rSettings = m_view->GetPainter()->GetSettings();
@ -316,7 +316,7 @@ void EDA_DRAW_PANEL_GAL::SetHighContrastLayer( LAYER_ID aLayer )
}
void EDA_DRAW_PANEL_GAL::SetTopLayer( LAYER_ID aLayer )
void EDA_DRAW_PANEL_GAL::SetTopLayer( int aLayer )
{
m_view->ClearTopLayers();
m_view->SetTopLayer( aLayer );

View File

@ -33,7 +33,6 @@
#include <wx/window.h>
#include <wx/timer.h>
#include <layers_id_colors_and_visibility.h>
#include <math/vector2d.h>
#include <msgpanel.h>
@ -150,13 +149,13 @@ public:
* Function SetHighContrastLayer
* Takes care of display settings for the given layer to be displayed in high contrast mode.
*/
virtual void SetHighContrastLayer( LAYER_ID aLayer );
virtual void SetHighContrastLayer( int aLayer );
/**
* Function SetTopLayer
* Moves the selected layer to the top, so it is displayed above all others.
*/
virtual void SetTopLayer( LAYER_ID aLayer );
virtual void SetTopLayer( int aLayer );
virtual void GetMsgPanelInfo( std::vector<MSG_PANEL_ITEM>& aList )
{

View File

@ -26,6 +26,7 @@
#define PCB_DRAW_PANEL_GAL_H_
#include <class_draw_panel_gal.h>
#include <layers_id_colors_and_visibility.h>
namespace KIGFX
{
@ -66,10 +67,22 @@ public:
void UseColorScheme( const COLORS_DESIGN_SETTINGS* aSettings );
///> @copydoc EDA_DRAW_PANEL_GAL::SetHighContrastLayer()
virtual void SetHighContrastLayer( LAYER_ID aLayer ) override;
virtual void SetHighContrastLayer( int aLayer ) override
{
SetHighContrastLayer( static_cast< LAYER_ID >( aLayer ) );
}
///> SetHighContrastLayer(), with some extra smarts for PCB
void SetHighContrastLayer( LAYER_ID aLayer );
///> @copydoc EDA_DRAW_PANEL_GAL::SetTopLayer()
virtual void SetTopLayer( LAYER_ID aLayer ) override;
virtual void SetTopLayer( int aLayer ) override
{
SetTopLayer( static_cast< LAYER_ID >( aLayer ) );
}
///> SetTopLayer(), with some extra smarts for PCB
void SetTopLayer( LAYER_ID aLayer );
/**
* Function SyncLayersVisibility