Gerbview: cleanup: remove a old and dead code.

This commit is contained in:
jean-pierre charras 2024-05-09 12:08:12 +02:00
parent 7acd057c86
commit 68c0be1097
4 changed files with 0 additions and 56 deletions

View File

@ -65,10 +65,6 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, EDA_DRAW_FRAME )
EVT_SELECT_DCODE( ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE, GERBVIEW_FRAME::OnSelectActiveDCode ) EVT_SELECT_DCODE( ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE, GERBVIEW_FRAME::OnSelectActiveDCode )
// Option toolbar
EVT_TOOL_RANGE( ID_TB_OPTIONS_SHOW_GBR_MODE_0, ID_TB_OPTIONS_SHOW_GBR_MODE_2,
GERBVIEW_FRAME::OnSelectDisplayMode )
// Auxiliary horizontal toolbar // Auxiliary horizontal toolbar
EVT_CHOICE( ID_GBR_AUX_TOOLBAR_PCB_CMP_CHOICE, GERBVIEW_FRAME::OnSelectHighlightChoice ) EVT_CHOICE( ID_GBR_AUX_TOOLBAR_PCB_CMP_CHOICE, GERBVIEW_FRAME::OnSelectHighlightChoice )
EVT_CHOICE( ID_GBR_AUX_TOOLBAR_PCB_NET_CHOICE, GERBVIEW_FRAME::OnSelectHighlightChoice ) EVT_CHOICE( ID_GBR_AUX_TOOLBAR_PCB_NET_CHOICE, GERBVIEW_FRAME::OnSelectHighlightChoice )
@ -81,8 +77,6 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, EDA_DRAW_FRAME )
EVT_UPDATE_UI( ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE, GERBVIEW_FRAME::OnUpdateSelectDCode ) EVT_UPDATE_UI( ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE, GERBVIEW_FRAME::OnUpdateSelectDCode )
EVT_UPDATE_UI( ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER, EVT_UPDATE_UI( ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER,
GERBVIEW_FRAME::OnUpdateLayerSelectBox ) GERBVIEW_FRAME::OnUpdateLayerSelectBox )
EVT_UPDATE_UI_RANGE( ID_TB_OPTIONS_SHOW_GBR_MODE_0, ID_TB_OPTIONS_SHOW_GBR_MODE_2,
GERBVIEW_FRAME::OnUpdateDrawMode )
// Drop files event // Drop files event
EVT_DROP_FILES( GERBVIEW_FRAME::OnDropFiles ) EVT_DROP_FILES( GERBVIEW_FRAME::OnDropFiles )
@ -151,19 +145,6 @@ void GERBVIEW_FRAME::OnSelectActiveLayer( wxCommandEvent& event )
} }
void GERBVIEW_FRAME::OnSelectDisplayMode( wxCommandEvent& event )
{
switch( event.GetId() )
{
case ID_TB_OPTIONS_SHOW_GBR_MODE_0: SetDisplayMode( 0 ); break;
case ID_TB_OPTIONS_SHOW_GBR_MODE_1: SetDisplayMode( 1 ); break;
case ID_TB_OPTIONS_SHOW_GBR_MODE_2: SetDisplayMode( 2 ); break;
}
GetCanvas()->Refresh();
}
void GERBVIEW_FRAME::OnQuit( wxCommandEvent& event ) void GERBVIEW_FRAME::OnQuit( wxCommandEvent& event )
{ {
Close( true ); Close( true );

View File

@ -85,7 +85,6 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent )
m_netText = nullptr; m_netText = nullptr;
m_apertText = nullptr; m_apertText = nullptr;
m_dcodeText = nullptr; m_dcodeText = nullptr;
m_displayMode = 0;
m_aboutTitle = _HKI( "KiCad Gerber Viewer" ); m_aboutTitle = _HKI( "KiCad Gerber Viewer" );
SHAPE_POLY_SET dummy; // A ugly trick to force the linker to include SHAPE_POLY_SET dummy; // A ugly trick to force the linker to include

View File

@ -94,20 +94,6 @@ public:
/// Updates the GAL with display settings changes /// Updates the GAL with display settings changes
void ApplyDisplaySettingsToGAL(); void ApplyDisplaySettingsToGAL();
/**
* @return 0 for fast mode (not fully compatible with negative objects)
* 1 for exact mode, write mode
* 2 for exact mode, OR mode (transparency mode)
*/
int GetDisplayMode() { return m_displayMode; }
/**
* @param aMode = 0 for fast mode
* 1 for exact mode, write mode
* 2 for exact mode, OR mode (transparency mode)
*/
void SetDisplayMode( int aMode ) { m_displayMode = aMode; }
/** /**
* Test whether a given element category is visible. Keep this as an inline function. * Test whether a given element category is visible. Keep this as an inline function.
* *
@ -532,16 +518,6 @@ protected:
// user. // user.
private: private:
int m_displayMode; // Gerber images ("layers" in Gerbview) can be drawn:
// - in fast mode (write mode) but if there are negative
// items only the last image is correctly drawn (no
// problem to see only one image or when no negative items)
// - in "exact" mode (but slower) in write mode:
// last image covers previous images
// - in "exact" mode (also slower) in OR mode
// (transparency mode)
// m_displayMode = 0, 1 or 2
bool m_show_layer_manager_tools; bool m_show_layer_manager_tools;
GBR_LAYOUT* m_gerberLayout; GBR_LAYOUT* m_gerberLayout;

View File

@ -471,18 +471,6 @@ void GERBVIEW_FRAME::updateAperAttributesSelectBox()
} }
void GERBVIEW_FRAME::OnUpdateDrawMode( wxUpdateUIEvent& aEvent )
{
switch( aEvent.GetId() )
{
case ID_TB_OPTIONS_SHOW_GBR_MODE_0: aEvent.Check( GetDisplayMode() == 0 ); break;
case ID_TB_OPTIONS_SHOW_GBR_MODE_1: aEvent.Check( GetDisplayMode() == 1 ); break;
case ID_TB_OPTIONS_SHOW_GBR_MODE_2: aEvent.Check( GetDisplayMode() == 2 ); break;
default: break;
}
}
void GERBVIEW_FRAME::OnUpdateSelectDCode( wxUpdateUIEvent& aEvent ) void GERBVIEW_FRAME::OnUpdateSelectDCode( wxUpdateUIEvent& aEvent )
{ {
if( !m_DCodeSelector ) if( !m_DCodeSelector )