Commit 7e93bb19 authored by dickelbeck's avatar dickelbeck

Isaac's via patch

parent 2b46b7d9
......@@ -363,6 +363,7 @@ set(BITMAP_SRCS
unzip.xpm
Update_Module_Board.xpm
up.xpm
Via_Sketch.xpm
viewlibs_icon.xpm
Web_support.xpm
Width_Net.xpm
......
/* XPM */
#ifndef XPMMAIN
extern const char *via_sketch_xpm[];
#else
const char * via_sketch_xpm[] = {
"16 16 3 1",
" c None",
". c #7D7D00",
"+ c #7C7C00",
" ",
" .... ",
" ..++++.. ",
" .. .. ",
" .. .. ",
" . .. . ",
" .+ .... +. ",
" .+ .. .. +. ",
" .+ .. .. +. ",
" .+ .... +. ",
" . .. . ",
" .. .. ",
" .. .. ",
" ..++++.. ",
" .... ",
" "};
#endif
......@@ -96,6 +96,7 @@ bool WinEDA_FootprintDisplayOptionsFrame::Create( wxWindow* parent, wxWindowID i
m_TextDisplayOption = NULL;
ColumnBoxSizer = NULL;
m_IsShowPadFill = NULL;
m_IsShowViaFill = NULL;
m_IsShowPadNum = NULL;
m_CancelButton = NULL;
////@end WinEDA_FootprintDisplayOptionsFrame member initialisation
......@@ -154,6 +155,10 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
m_IsShowPadFill->SetValue(false);
ColumnBoxSizer->Add(m_IsShowPadFill, 1, wxGROW|wxALL, 5);
m_IsShowViaFill = new wxCheckBox( itemDialog1, VIAFILL_OPT, _("Fill &via"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_IsShowViaFill->SetValue(false);
ColumnBoxSizer->Add(m_IsShowViaFill, 1, wxGROW|wxALL, 5);
m_IsShowPadNum = new wxCheckBox( itemDialog1, PADNUM_OPT, _("Show pad &number"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_IsShowPadNum->SetValue(false);
if (WinEDA_FootprintDisplayOptionsFrame::ShowToolTips())
......@@ -181,6 +186,7 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
m_EdgesDisplayOption->SetValidator( wxGenericValidator(& DisplayOpt.DisplayModEdge) );
m_TextDisplayOption->SetValidator( wxGenericValidator(& DisplayOpt.DisplayModText) );
m_IsShowPadFill->SetValidator( wxGenericValidator( & DisplayOpt.DisplayPadFill) );
m_IsShowViaFill->SetValidator( wxGenericValidator( & DisplayOpt.DisplayViaFill) );
m_IsShowPadNum->SetValidator( wxGenericValidator(& DisplayOpt.DisplayPadNum) );
////@end WinEDA_FootprintDisplayOptionsFrame content construction
......@@ -234,6 +240,7 @@ void WinEDA_FootprintDisplayOptionsFrame::UpdateObjectSettings(void)
m_Parent->m_DisplayModText = m_TextDisplayOption->GetSelection();
m_Parent->m_DisplayPadNum = m_IsShowPadNum->GetValue();
m_Parent->m_DisplayPadFill = m_IsShowPadFill->GetValue();
m_Parent->m_DisplayViaFill = m_IsShowViaFill->GetValue();
m_Parent->DrawPanel->Refresh();
////@end WinEDA_FootprintDisplayOptionsFrame update settings
}
......
......@@ -45,6 +45,7 @@ class wxBoxSizer;
#define TEXT_SELECT 10002
#define PADFILL_OPT 10003
#define PADNUM_OPT 10004
#define VIAFILL_OPT 10005
#define ID_STATICLINE1 10006
#define SYMBOL_WINEDA_FOOTPRINTDISPLAYOPTIONSFRAME_STYLE wxDEFAULT_DIALOG_STYLE|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_FOOTPRINTDISPLAYOPTIONSFRAME_TITLE _("Display Options")
......@@ -115,6 +116,7 @@ public:
wxRadioBox* m_TextDisplayOption;
wxBoxSizer* ColumnBoxSizer;
wxCheckBox* m_IsShowPadFill;
wxCheckBox* m_IsShowViaFill;
wxCheckBox* m_IsShowPadNum;
wxButton* m_CancelButton;
////@end WinEDA_FootprintDisplayOptionsFrame member variables
......
......@@ -272,6 +272,9 @@ void WinEDA_GerberFrame::SetToolbars()
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
!m_DisplayPadFill );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
!m_DisplayViaFill );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
!m_DisplayPcbTrackFill );
......
......@@ -61,6 +61,14 @@ static PARAM_CFG_INT PadFillCfg
TRUE /* Valeur par defaut */
);
static PARAM_CFG_INT ViaFillCfg
(
INSETUP,
wxT("ViaFill"), /* identification */
(int*)&DisplayOpt.DisplayViaFill, /* Adresse du parametre */
TRUE /* Valeur par defaut */
);
static PARAM_CFG_BOOL PadShowNumCfg // Affiche DCodes
(
INSETUP,
......@@ -391,6 +399,7 @@ PARAM_CFG_BASE * ParamCfgList[] =
& GerberScaleCfg,
& SegmFillCfg,
& PadFillCfg,
& ViaFillCfg, //TODO: Will adding this line break tha pcbnew file compatibility?
& PadShowNumCfg,
& ColorLayer0Cfg,
& ColorLayer1Cfg,
......
......@@ -24,6 +24,7 @@ void Print_PcbItems(BOARD * Pcb, wxDC *DC, int drawmode, int printmasklayer)
save_opt = DisplayOpt;
DisplayOpt.DisplayPadFill = FILLED;
DisplayOpt.DisplayViaFill = FILLED;
DisplayOpt.DisplayPadNum = 0;
DisplayOpt.DisplayPadNoConn = 0;
DisplayOpt.DisplayPadIsol = 0;
......
......@@ -71,6 +71,18 @@ void WinEDA_GerberFrame::OnSelectOptionToolbar( wxCommandEvent& event )
DrawPanel->Refresh( TRUE );
break;
case ID_TB_OPTIONS_SHOW_VIAS_SKETCH:
if( m_OptionsToolBar->GetToolState( id ) )
{
DisplayOpt.DisplayViaFill = m_DisplayViaFill = false;
}
else
{
DisplayOpt.DisplayViaFill = m_DisplayViaFill = true;
}
DrawPanel->Refresh( TRUE );
break;
case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH:
if( m_OptionsToolBar->GetToolState( id ) )
{
......@@ -249,6 +261,7 @@ private:
WinEDA_BasePcbFrame* m_Parent;
wxRadioBox* m_OptDisplayLines;
wxRadioBox* m_OptDisplayFlashes;
wxRadioBox* m_OptDisplayVias; //@@@@TODO: Does it belong here?
wxRadioBox* m_OptDisplayPolygons;
wxCheckBox* m_OptDisplayDCodes;
wxRadioBox* m_OptDisplayDrawings;
......@@ -314,6 +327,16 @@ WinEDA_LookFrame::WinEDA_LookFrame( WinEDA_BasePcbFrame* parent,
m_OptDisplayFlashes->SetSelection( 1 );
LeftBoxSizer->Add( m_OptDisplayFlashes, 0, wxGROW | wxALL, 5 );
m_OptDisplayVias = new wxRadioBox( this, -1, _( "Spots:" ),
wxDefaultPosition, wxDefaultSize,
2, list_opt2, 1 );
if( DisplayOpt.DisplayViaFill )
m_OptDisplayVias->SetSelection( 1 );
LeftBoxSizer->Add( m_OptDisplayVias, 0, wxGROW | wxALL, 5 );
// Show Option Draw polygons
m_OptDisplayPolygons = new wxRadioBox( this, -1, _( "Polygons:" ),
wxDefaultPosition, wxDefaultSize,
......@@ -364,6 +387,12 @@ void WinEDA_LookFrame::OnOkClick( wxCommandEvent& event )
else
DisplayOpt.DisplayPadFill = false;
if( m_OptDisplayVias->GetSelection() == 1 )
DisplayOpt.DisplayViaFill = true;
else
DisplayOpt.DisplayViaFill = false;
if( m_OptDisplayPolygons->GetSelection() == 0 )
g_DisplayPolygonsModeSketch = 1;
else
......@@ -374,6 +403,7 @@ void WinEDA_LookFrame::OnOkClick( wxCommandEvent& event )
DisplayOpt.DisplayDrawItems = m_OptDisplayDrawings->GetSelection();
m_Parent->m_DisplayPadFill = DisplayOpt.DisplayPadFill;
m_Parent->m_DisplayViaFill = DisplayOpt.DisplayViaFill;
m_Parent->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill;
m_Parent->GetScreen()->SetRefreshReq();
......
......@@ -362,6 +362,10 @@ create or update the left vertical toolbar (option toolbar
wxBitmap( pad_sketch_xpm ),
_( "Show Spots in Sketch Mode" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_VIAS_SKETCH, wxEmptyString,
wxBitmap( via_sketch_xpm ),
_( "Show Vias in Sketch Mode" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, wxEmptyString,
wxBitmap( showtrack_xpm ),
_( "Show Lines in Sketch Mode" ), wxITEM_CHECK );
......
......@@ -34,9 +34,15 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
save_opt = DisplayOpt;
if( printmasklayer & ALL_CU_LAYERS )
{
DisplayOpt.DisplayPadFill = true;
DisplayOpt.DisplayViaFill = true;
}
else
{
DisplayOpt.DisplayPadFill = false;
DisplayOpt.DisplayViaFill = false;
}
DisplayOpt.DisplayPadNum = 0;
DisplayOpt.DisplayPadNoConn = 0;
DisplayOpt.DisplayPadIsol = 0;
......
......@@ -359,6 +359,7 @@ extern const char* unlocked_xpm[];
extern const char* unzip_xpm[];
extern const char* update_module_board_xpm[];
extern const char* up_xpm[];
extern const char* via_sketch_xpm[];
extern const char* viewlibs_icon_xpm[];
extern const char* warning_xpm[];
extern const char* web_support_xpm[];
......
......@@ -225,6 +225,7 @@ enum main_id
ID_TB_OPTIONS_HIDDEN_PINS,
ID_TB_OPTIONS_BUS_WIRES_ORIENT,
ID_TB_OPTIONS_SHOW_PADS_SKETCH,
ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH,
ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH,
......
......@@ -238,6 +238,7 @@ class DISPLAY_OPTIONS
{
public:
bool DisplayPadFill;
bool DisplayViaFill;
bool DisplayPadNum;
bool DisplayPadNoConn;
bool DisplayPadIsol;
......
......@@ -51,6 +51,7 @@ class WinEDA_BasePcbFrame : public WinEDA_DrawFrame
public:
bool m_DisplayPadFill; // How show pads
bool m_DisplayViaFill; // How show vias
bool m_DisplayPadNum; // show pads numbers
int m_DisplayModEdge; // How show module drawings
......
......@@ -26,6 +26,7 @@ static const wxString UserGridSizeXEntry( wxT( "PcbUserGrid_X" ) );
static const wxString UserGridSizeYEntry( wxT( "PcbUserGrid_Y" ) );
static const wxString UserGridUnitsEntry( wxT( "PcbUserGrid_Unit" ) );
static const wxString DisplayPadFillEntry( wxT( "DiPadFi" ) );
static const wxString DisplayViaFillEntry( wxT( "DiViaFi" ) );
static const wxString DisplayPadNumberEntry( wxT( "DiPadNu" ) );
static const wxString DisplayModuleEdgeEntry( wxT( "DiModEd" ) );
static const wxString DisplayModuleTextEntry( wxT( "DiModTx" ) );
......@@ -58,6 +59,7 @@ WinEDA_BasePcbFrame::WinEDA_BasePcbFrame( wxWindow* father,
m_Pcb = NULL;
m_DisplayPadFill = true; // How to draw pads
m_DisplayViaFill = true; // How to draw vias
m_DisplayPadNum = true; // show pads number
m_DisplayModEdge = FILLED; // How to show module drawings
......@@ -383,6 +385,7 @@ void WinEDA_BasePcbFrame::LoadSettings()
cfg->Read( m_FrameName + UserGridUnitsEntry, &m_UserGridUnits,
( long )INCHES );
cfg->Read( m_FrameName + DisplayPadFillEntry, &m_DisplayPadFill, true );
cfg->Read( m_FrameName + DisplayViaFillEntry, &m_DisplayViaFill, true ); //TODO: Will adding this line break tha pcbnew file compatibility?
cfg->Read( m_FrameName + DisplayPadNumberEntry, &m_DisplayPadNum, true );
cfg->Read( m_FrameName + DisplayModuleEdgeEntry, &m_DisplayModEdge,
( long )FILLED );
......@@ -412,6 +415,7 @@ void WinEDA_BasePcbFrame::SaveSettings()
cfg->Write( m_FrameName + UserGridSizeYEntry, m_UserGridSize.y );
cfg->Write( m_FrameName + UserGridUnitsEntry, ( long )m_UserGridUnits );
cfg->Write( m_FrameName + DisplayPadFillEntry, m_DisplayPadFill );
cfg->Write( m_FrameName + DisplayViaFillEntry, m_DisplayViaFill ); //TODO: Will adding this line break tha pcbnew file compatibility?
cfg->Write( m_FrameName + DisplayPadNumberEntry, m_DisplayPadNum );
cfg->Write( m_FrameName + DisplayModuleEdgeEntry, ( long )m_DisplayModEdge );
cfg->Write( m_FrameName + DisplayModuleTextEntry, ( long )m_DisplayModText );
......
......@@ -284,7 +284,7 @@ const char** BOARD_ITEM::MenuIcon() const
break;
case TYPE_VIA:
xpm = pad_sketch_xpm;
xpm = via_sketch_xpm;
break;
case TYPE_MARKER_PCB:
......
......@@ -733,6 +733,12 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
int rayon;
int curr_layer = ( (PCB_SCREEN*) panel->GetScreen() )->m_Active_Layer;
int fillvia = 0;
WinEDA_BasePcbFrame* frame = (WinEDA_BasePcbFrame*) panel->m_Parent;
PCB_SCREEN* screen = frame->GetScreen();
if( frame->m_DisplayViaFill == FILLED )
fillvia = 1;
GRSetDrawMode( DC, draw_mode );
color = g_DesignSettings.m_ViaColor[m_Shape];
......@@ -770,6 +776,9 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
return;
}
if( fillvia )
GRFilledCircle( &panel->m_ClipBox, DC, m_Start.x, m_Start.y, rayon, 0, color, color );
else
GRCircle( &panel->m_ClipBox, DC, m_Start.x, m_Start.y, rayon, color );
int drill_rayon = GetDrillValue() / 2;
......@@ -785,12 +794,39 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
|| ( (drill_rayon > 0 ) && !IsDrillDefault() ) ) // Or Display non default holes requested
{
if( drill_rayon < inner_rayon ) // We can show the via hole
{
if( fillvia )
{
bool blackpenstate = false;
if( screen->m_IsPrinting )
{
blackpenstate = GetGRForceBlackPenState();
GRForceBlackPen( false );
color = g_DrawBgColor;
}
else
color = BLACK; // or DARKGRAY;
if( draw_mode != GR_XOR )
GRSetDrawMode( DC, GR_COPY );
else
GRSetDrawMode( DC, GR_XOR );
if( screen->Scale( drill_rayon ) > 1 ) /* draw hole if its size is enought */
GRFilledCircle( &panel->m_ClipBox, DC, m_Start.x,
m_Start.y, drill_rayon, 0, color, color );
if( screen->m_IsPrinting )
GRForceBlackPen( blackpenstate );
}
else
{
GRCircle( &panel->m_ClipBox, DC, m_Start.x, m_Start.y,
drill_rayon, color );
}
}
}
}
if( DisplayOpt.ShowTrackClearanceMode == SHOW_CLEARANCE_ALWAYS )
GRCircle( &panel->m_ClipBox, DC, m_Start.x, m_Start.y,
......
......@@ -138,6 +138,7 @@ bool PCB_SCREEN::IsMicroViaAcceptable( void )
DISPLAY_OPTIONS::DISPLAY_OPTIONS()
{
DisplayPadFill = FILLED;
DisplayViaFill = FILLED;
DisplayPadNum = true;
DisplayPadNoConn = true;
DisplayPadIsol = true;
......
......@@ -83,6 +83,11 @@ void Dialog_Display_Options::init()
else
m_OptDisplayPads->SetSelection(0);
if ( DisplayOpt.DisplayViaFill )
m_OptDisplayVias->SetSelection(1);
else
m_OptDisplayVias->SetSelection(0);
m_Show_Page_Limits->SetSelection( g_ShowPageLimits ? 0 : 1);
m_OptDisplayViaHole->SetSelection( DisplayOpt.m_DisplayViaMode );
......@@ -149,7 +154,13 @@ void Dialog_Display_Options::OnOkClick(wxCommandEvent& event)
else
DisplayOpt.DisplayPadFill = false;
if (m_OptDisplayVias->GetSelection() == 1 )
DisplayOpt.DisplayViaFill = true;
else
DisplayOpt.DisplayViaFill = false;
m_Parent->m_DisplayPadFill = DisplayOpt.DisplayPadFill;
m_Parent->m_DisplayViaFill = DisplayOpt.DisplayViaFill;
DisplayOpt.DisplayPadIsol = m_OptDisplayPadClearence->GetValue();
......
......@@ -87,6 +87,10 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow
m_OptDisplayPads->SetSelection( 1 );
bRModuleSizer->Add( m_OptDisplayPads, 0, wxALL|wxEXPAND, 5 );
m_OptDisplayVias = new wxRadioBox( this, ID_VIAS_SHAPES, _("Via Shapes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayPadsNChoices, m_OptDisplayPadsChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayVias->SetSelection( 1 );
bRModuleSizer->Add( m_OptDisplayVias, 0, wxALL|wxEXPAND, 5 );
m_OptDisplayPadClearence = new wxCheckBox( this, wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 );
bRModuleSizer->Add( m_OptDisplayPadClearence, 0, wxALL, 5 );
......
......@@ -40,6 +40,7 @@ class DialogDisplayOptions_base : public wxDialog
ID_EDGES_MODULES,
ID_TEXT_MODULES,
ID_PADS_SHAPES,
ID_VIAS_SHAPES
};
wxRadioBox* m_OptDisplayTracks;
......@@ -49,6 +50,7 @@ class DialogDisplayOptions_base : public wxDialog
wxRadioBox* m_OptDisplayModEdges;
wxRadioBox* m_OptDisplayModTexts;
wxRadioBox* m_OptDisplayPads;
wxRadioBox* m_OptDisplayVias;
wxCheckBox* m_OptDisplayPadClearence;
wxCheckBox* m_OptDisplayPadNumber;
wxCheckBox* m_OptDisplayPadNoConn;
......
......@@ -270,6 +270,18 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
DrawPanel->Refresh( );
break;
case ID_TB_OPTIONS_SHOW_VIAS_SKETCH:
if( m_OptionsToolBar->GetToolState( id ) )
{
m_DisplayViaFill = DisplayOpt.DisplayViaFill = false;
}
else
{
m_DisplayViaFill = DisplayOpt.DisplayViaFill = true;
}
DrawPanel->Refresh( );
break;
case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH:
m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill =
!m_OptionsToolBar->GetToolState( id );
......
......@@ -230,6 +230,7 @@ this file again."));
m_DisplayModText = DisplayOpt.DisplayModText;
m_DisplayModEdge = DisplayOpt.DisplayModEdge;
m_DisplayPadFill = DisplayOpt.DisplayPadFill;
m_DisplayViaFill = DisplayOpt.DisplayViaFill;
ReadPcbFile( source, false );
}
......
......@@ -31,7 +31,7 @@
const wxString ModExportFileExtension( wxT( "emp" ) );
#define ModExportFileWildcard _( "Kicad foot print export files (*.emp)|*.emp" )
static const wxString ModExportFileWildcard( _( "Kicad foot print export files (*.emp)|*.emp" ) );
/* Fonctions locales */
......
......@@ -62,6 +62,11 @@ wxClientDC dc(DrawPanel);
DrawPanel->ReDraw(&dc, TRUE);
break;
case ID_TB_OPTIONS_SHOW_VIAS_SKETCH:
m_DisplayViaFill = ! m_OptionsToolBar->GetToolState(id);
DrawPanel->ReDraw(&dc, TRUE);
break;
case ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH:
m_DisplayModText =
m_OptionsToolBar->GetToolState(id) ? SKETCH : FILLED;
......
......@@ -347,6 +347,13 @@ void WinEDA_ModuleEditFrame::SetToolbars()
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_CURSOR,
m_CursorShape );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
!m_DisplayViaFill );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
m_DisplayViaFill ?
_( "Show Vias Sketch mode" ) :
_( "Show vias filled mode" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
!m_DisplayPadFill );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
......
......@@ -218,6 +218,14 @@ static PARAM_CFG_BOOL PadFillCfg
TRUE /* Default value */
);
static PARAM_CFG_BOOL ViaFillCfg
(
INSETUP,
wxT( "ViaFill" ), /* Keyword */
&DisplayOpt.DisplayViaFill, /* Parameter address */
TRUE /* Default value */
);
static PARAM_CFG_BOOL PadAfficheGardeCfg
(
INSETUP,
......@@ -812,6 +820,7 @@ PARAM_CFG_BASE* ParamCfgList[] =
&SegmFillCfg,
&TrackDisplayClearanceCfg,
&PadFillCfg,
&ViaFillCfg, //TODO: Will adding this line break tha pcbnew file compatibility?
&PadAfficheGardeCfg,
&PadShowNumCfg,
&AfficheContourModuleCfg,
......
......@@ -234,6 +234,7 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill;
m_DisplayPadFill = DisplayOpt.DisplayPadFill;
m_DisplayViaFill = DisplayOpt.DisplayViaFill;
m_DisplayPadNum = DisplayOpt.DisplayPadNum;
m_DisplayModEdge = DisplayOpt.DisplayModEdge;
......@@ -369,3 +370,4 @@ void WinEDA_PcbFrame::ShowDesignRulesEditor( wxCommandEvent& event )
GetScreen()->SetModify();
}
}
......@@ -35,10 +35,18 @@ void WinEDA_DrawPanel::PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, int aPrintMa
save_opt = DisplayOpt;
if( aPrintMaskLayer & ALL_CU_LAYERS )
{
DisplayOpt.DisplayPadFill = true;
DisplayOpt.DisplayViaFill = true;
}
else
{
DisplayOpt.DisplayPadFill = false;
DisplayOpt.DisplayViaFill = false;
}
frame->m_DisplayPadFill = DisplayOpt.DisplayPadFill;
frame->m_DisplayViaFill = DisplayOpt.DisplayViaFill;
frame->m_DisplayPadNum = DisplayOpt.DisplayPadNum = false;
DisplayOpt.DisplayPadNoConn = false;
DisplayOpt.DisplayPadIsol = false;
......@@ -154,6 +162,7 @@ void WinEDA_DrawPanel::PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, int aPrintMa
DisplayOpt = save_opt;
frame->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill;
frame->m_DisplayPadFill = DisplayOpt.DisplayPadFill;
frame->m_DisplayViaFill = DisplayOpt.DisplayViaFill;
frame->m_DisplayPadNum = DisplayOpt.DisplayPadNum;
}
......
......@@ -229,6 +229,10 @@ void WinEDA_ModuleEditFrame::ReCreateOptToolbar()
wxBitmap( pad_sketch_xpm ),
_( "Show Pads Sketch" ) );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_VIAS_SKETCH, wxEmptyString,
wxBitmap( via_sketch_xpm ),
_( "Show Vias Sketch" ) );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH, wxEmptyString,
wxBitmap( text_sketch_xpm ),
_( "Show Texts Sketch" ) );
......
......@@ -367,6 +367,10 @@ void WinEDA_PcbFrame::ReCreateOptToolbar()
wxBitmap( pad_sketch_xpm ),
_( "Show Pads Sketch" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_VIAS_SKETCH, wxEmptyString,
wxBitmap( via_sketch_xpm ),
_( "Show Vias Sketch" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, wxEmptyString,
wxBitmap( showtrack_xpm ),
_( "Show Tracks Sketch" ), wxITEM_CHECK );
......
......@@ -195,13 +195,13 @@ void WinEDA_PcbFrame::SetToolbars()
DisplayOpt.DisplayPolarCood );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_POLAR_COORD,
DisplayOpt.DisplayPolarCood ?
_( "Polar Coords not show" ) :
_( "Display Polar Coords" ) );
_( "Polar coords not show" ) :
_( "Display polar coords" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_GRID,
m_Draw_Grid );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_GRID,
m_Draw_Grid ? _( "Grid not show" ) : _( "Show Grid" ) );
m_Draw_Grid ? _( "Grid not show" ) : _( "Show grid" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SELECT_CURSOR,
m_CursorShape );
......@@ -210,51 +210,60 @@ void WinEDA_PcbFrame::SetToolbars()
g_Show_Ratsnest );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_RATSNEST,
g_Show_Ratsnest ?
_( "Hide General ratsnest" ) :
_( "Show General ratsnest" ) );
_( "Hide general ratsnest" ) :
_( "Show general ratsnest" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_MODULE_RATSNEST,
g_Show_Module_Ratsnest );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_MODULE_RATSNEST,
g_Show_Module_Ratsnest ?
_( "Hide Module ratsnest" ) :
_( "Show Module ratsnest" ) );
_( "Hide module ratsnest" ) :
_( "Show module ratsnest" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_AUTO_DEL_TRACK,
g_AutoDeleteOldTrack );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_AUTO_DEL_TRACK,
g_AutoDeleteOldTrack ?
_( "Disable Auto Delete old Track" ) :
_( "Enable Auto Delete old Track" ) );
_( "Disable auto delete old track" ) :
_( "Enable auto delete old track" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
!m_DisplayPadFill );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_PADS_SKETCH,
m_DisplayPadFill ?
_( "Show Pads Sketch mode" ) :
_( "Show pads sketch mode" ) :
_( "Show pads filled mode" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
!m_DisplayViaFill );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_VIAS_SKETCH,
m_DisplayViaFill ?
_( "Show vias sketch mode" ) :
_( "Show vias filled mode" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
!m_DisplayPcbTrackFill );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
m_DisplayPcbTrackFill ?
_( "Show Tracks Sketch mode" ) :
_( "Show Tracks filled mode" ) );
_( "Show tracks sketch mode" ) :
_( "Show tracks filled mode" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
DisplayOpt.ContrastModeDisplay );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
DisplayOpt.ContrastModeDisplay ?
_( "Normal Contrast Mode Display" ) :
_( "High Contrast Mode Display" ) );
_( "Normal contrast mode display" ) :
_( "High contrast mode display" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
g_ModuleTextNOVColor & ITEM_NOT_SHOW );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
g_ModuleTextNOVColor & (ITEM_NOT_SHOW) ?
_( "Show Invisible Text" ) :
_( "Hide Invisible Text" ) );
_( "Show invisible text" ) :
_( "Hide invisible text" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1, m_AuxVToolBar ? true : false );
}
......
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