Clear selection before printing

Selected objects are hidden in VIEW, that makes them disappear from
printouts.
This commit is contained in:
Maciej Suminski 2018-09-28 16:29:03 +02:00
parent 347e21daaa
commit 698a380827
2 changed files with 12 additions and 0 deletions

View File

@ -37,6 +37,9 @@
#include <gerber_file_image.h>
#include <gerber_file_image_list.h>
#include <tool/tool_manager.h>
#include <tools/gerbview_actions.h>
#include <enabler.h>
///@{
@ -107,6 +110,9 @@ public:
void GERBVIEW_FRAME::ToPrinter( wxCommandEvent& event )
{
// Selection affects the original item visibility
GetToolManager()->RunAction( GERBVIEW_ACTIONS::selectionClear, true );
if( s_printData == NULL ) // First print
s_printData = new wxPrintData();

View File

@ -35,6 +35,9 @@
#include <enabler.h>
#include <widgets/unit_binder.h>
#include <tool/tool_manager.h>
#include <tools/pcb_actions.h>
#include <dialog_print_using_printer_base.h>
#define PEN_WIDTH_MAX_VALUE ( KiROUND( 5 * IU_PER_MM ) )
@ -99,6 +102,9 @@ bool DIALOG_PRINT_USING_PRINTER::m_ExcludeEdgeLayer;
void PCB_EDIT_FRAME::ToPrinter( wxCommandEvent& event )
{
// Selection affects the original item visibility
GetToolManager()->RunAction( PCB_ACTIONS::selectionClear, true );
const PAGE_INFO& pageInfo = GetPageSettings();
if( s_PrintData == NULL ) // First print