Commit 0629e587 authored by a-lunev's avatar a-lunev

bug tracker: [ 2069722 ] PCB edge always printed when PCB edge layer not selected.

It is resolved by adding 'Exclude Edges_Pcb layer' check box in 'Print' dialog.
parent eadabde8
...@@ -51,8 +51,6 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl ...@@ -51,8 +51,6 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl
DisplayOpt.DisplayDrawItems = FILLED; DisplayOpt.DisplayDrawItems = FILLED;
DisplayOpt.DisplayZones = TRUE; DisplayOpt.DisplayZones = TRUE;
printmasklayer |= EDGE_LAYER;
/* Draw the pcb graphic items (texts, ...) */ /* Draw the pcb graphic items (texts, ...) */
for( BOARD_ITEM* item = Pcb->m_Drawings; item; item = item->Next() ) for( BOARD_ITEM* item = Pcb->m_Drawings; item; item = item->Next() )
{ {
......
...@@ -80,6 +80,7 @@ bool WinEDA_PrintFrame::Create( wxWindow* parent, wxWindowID id, const wxString& ...@@ -80,6 +80,7 @@ bool WinEDA_PrintFrame::Create( wxWindow* parent, wxWindowID id, const wxString&
////@begin WinEDA_PrintFrame member initialisation ////@begin WinEDA_PrintFrame member initialisation
m_CopperLayersBoxSizer = NULL; m_CopperLayersBoxSizer = NULL;
m_TechLayersBoxSizer = NULL; m_TechLayersBoxSizer = NULL;
m_Exclude_Edges_Pcb = NULL;
m_ScaleOption = NULL; m_ScaleOption = NULL;
m_FineAdjustXscaleTitle = NULL; m_FineAdjustXscaleTitle = NULL;
m_FineAdjustXscaleOpt = NULL; m_FineAdjustXscaleOpt = NULL;
...@@ -124,14 +125,29 @@ void WinEDA_PrintFrame::CreateControls() ...@@ -124,14 +125,29 @@ void WinEDA_PrintFrame::CreateControls()
wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxHORIZONTAL);
itemDialog1->SetSizer(itemBoxSizer2); itemDialog1->SetSizer(itemBoxSizer2);
wxBoxSizer* leftBoxSizer = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(leftBoxSizer, 0, wxALIGN_TOP|wxALL,5);
wxBoxSizer* layersBoxSizer = new wxBoxSizer(wxHORIZONTAL);
leftBoxSizer->Add(layersBoxSizer, 0, wxGROW|wxALL,5);
m_CopperLayersBoxSizer = new wxBoxSizer(wxVERTICAL); m_CopperLayersBoxSizer = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(m_CopperLayersBoxSizer, 0, wxALIGN_TOP|wxALL, 5); layersBoxSizer->Add(m_CopperLayersBoxSizer, 0, wxGROW|wxALL, 5);
m_TechLayersBoxSizer = new wxBoxSizer(wxVERTICAL); m_TechLayersBoxSizer = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(m_TechLayersBoxSizer, 0, wxALIGN_TOP|wxALL, 5); layersBoxSizer->Add(m_TechLayersBoxSizer, 0, wxALIGN_TOP|wxALL, 5);
wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL); wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL);
itemBoxSizer2->Add(itemBoxSizer5, 0, wxGROW|wxALL, 5); itemBoxSizer2->Add(itemBoxSizer5, 0, wxGROW|wxALL, 5);
// Option for excluding contents of "Edges Pcb" layer
m_Exclude_Edges_Pcb = new wxCheckBox( this,
ID_EXCLUDE_EDGES_PCB, _( "Exclude Edges_Pcb layer" ) );
//m_Exclude_Edges_Pcb->SetValue( g_Exclude_Edges_Pcb );
m_Exclude_Edges_Pcb->SetToolTip(
_( "Exclude contents of Edges_Pcb layer from all other layers" ) );
leftBoxSizer->Add( m_Exclude_Edges_Pcb, 0, wxGROW | wxALL, 1 );
wxArrayString m_ScaleOptionStrings; wxArrayString m_ScaleOptionStrings;
m_ScaleOptionStrings.Add(_("fit in page")); m_ScaleOptionStrings.Add(_("fit in page"));
......
...@@ -47,6 +47,7 @@ class wxBoxSizer; ...@@ -47,6 +47,7 @@ class wxBoxSizer;
#define ID_PRINT_SETUP 10001 #define ID_PRINT_SETUP 10001
#define ID_PRINT_PREVIEW 10002 #define ID_PRINT_PREVIEW 10002
#define ID_PRINT_EXECUTE 10003 #define ID_PRINT_EXECUTE 10003
#define ID_EXCLUDE_EDGES_PCB 10012
#define SYMBOL_WINEDA_PRINTFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER #define SYMBOL_WINEDA_PRINTFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_PRINTFRAME_TITLE _("Print") #define SYMBOL_WINEDA_PRINTFRAME_TITLE _("Print")
#define SYMBOL_WINEDA_PRINTFRAME_IDNAME ID_DIALOG #define SYMBOL_WINEDA_PRINTFRAME_IDNAME ID_DIALOG
...@@ -131,6 +132,7 @@ public: ...@@ -131,6 +132,7 @@ public:
////@begin WinEDA_PrintFrame member variables ////@begin WinEDA_PrintFrame member variables
wxBoxSizer* m_CopperLayersBoxSizer; wxBoxSizer* m_CopperLayersBoxSizer;
wxBoxSizer* m_TechLayersBoxSizer; wxBoxSizer* m_TechLayersBoxSizer;
wxCheckBox* m_Exclude_Edges_Pcb;
wxRadioBox* m_ScaleOption; wxRadioBox* m_ScaleOption;
wxStaticText* m_FineAdjustXscaleTitle; wxStaticText* m_FineAdjustXscaleTitle;
wxTextCtrl* m_FineAdjustXscaleOpt; wxTextCtrl* m_FineAdjustXscaleOpt;
......
...@@ -820,6 +820,7 @@ void EDA_Printout::DrawPage() ...@@ -820,6 +820,7 @@ void EDA_Printout::DrawPage()
panel->m_ClipBox.SetOrigin( wxPoint( -0x7FFFFF, -0x7FFFFF ) ); panel->m_ClipBox.SetOrigin( wxPoint( -0x7FFFFF, -0x7FFFFF ) );
} }
if ( !m_PrintFrame->m_Exclude_Edges_Pcb->GetValue() ) s_PrintMaskLayer |= EDGE_LAYER;
panel->PrintPage( dc, 0, s_PrintMaskLayer ); panel->PrintPage( dc, 0, s_PrintMaskLayer );
#else #else
......
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