Commit 3f5478ee authored by jean-pierre charras's avatar jean-pierre charras

fix 2 minor bugs: GERBVIEW: Button "Erase all layers" not working, EESCHEMA:...

fix 2 minor bugs: GERBVIEW: Button "Erase all layers" not working, EESCHEMA: Plot to Clipboard: EDA_DRAW_FRAME::PrintPage() error
parent 2694c524
......@@ -6,7 +6,7 @@
#endif
#ifndef KICAD_BUILD_VERSION
#define KICAD_BUILD_VERSION "(2011-03-25)"
#define KICAD_BUILD_VERSION "(2011-03-28)"
#endif
// uncomment this line only when creating a stable version
......
......@@ -15,7 +15,7 @@
#include "confirm.h"
#include "wxstruct.h"
static bool DrawPage( EDA_DRAW_FRAME* aFrame );
static bool DrawPageOnClipboard( EDA_DRAW_FRAME* aFrame );
/* calls the function to copy the current page or the current bock to
......@@ -23,7 +23,7 @@ static bool DrawPage( EDA_DRAW_FRAME* aFrame );
*/
void EDA_DRAW_FRAME::CopyToClipboard( wxCommandEvent& event )
{
DrawPage( this );
DrawPageOnClipboard( this );
if( event.GetId() == ID_GEN_COPY_BLOCK_TO_CLIPBOARD )
{
......@@ -39,7 +39,7 @@ void EDA_DRAW_FRAME::CopyToClipboard( wxCommandEvent& event )
* to export drawings to other applications (word processing ...)
* This is not suitable for copy command within eeschema or pcbnew
*/
bool DrawPage( EDA_DRAW_FRAME* aFrame )
bool DrawPageOnClipboard( EDA_DRAW_FRAME* aFrame )
{
bool success = TRUE;
......@@ -49,7 +49,7 @@ bool DrawPage( EDA_DRAW_FRAME* aFrame )
wxPoint old_org;
wxPoint DrawOffset;
int ClipboardSizeX, ClipboardSizeY;
bool DrawBlock = FALSE;
bool DrawBlock = false;
wxRect DrawArea;
BASE_SCREEN* screen = aFrame->DrawPanel->GetScreen();
......@@ -78,7 +78,7 @@ bool DrawPage( EDA_DRAW_FRAME* aFrame )
EDA_Rect tmp = aFrame->DrawPanel->m_ClipBox;
GRResetPenAndBrush( &dc );
const bool plotBlackAndWhite = FALSE;
const bool plotBlackAndWhite = false;
GRForceBlackPen( plotBlackAndWhite );
screen->m_IsPrinting = true;
dc.SetUserScale( scale, scale );
......@@ -107,7 +107,7 @@ bool DrawPage( EDA_DRAW_FRAME* aFrame )
}
GRForceBlackPen( FALSE );
GRForceBlackPen( false );
screen->m_StartVisu = tmp_startvisu;
screen->m_DrawOrg = old_org;
......
......@@ -343,7 +343,6 @@ protected:
/** Virtual function PrintPage
* used to print a page
* Print the page pointed by ActiveScreen, set by the calling print function
* @param aDC = wxDC given by the calling print function
* @param aPrintMask = not used here
* @param aPrintMirrorMode = not used here (Set when printing in mirror mode)
......
......@@ -9,6 +9,7 @@
#include "fctsys.h"
#include "appl_wxstruct.h"
#include "common.h"
#include "gr_basic.h"
#include "class_drawpanel.h"
#include "gestfich.h"
#include "bitmaps.h"
......@@ -62,7 +63,6 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_MENU( ID_GEN_PLOT_SVG, SCH_EDIT_FRAME::SVG_Print )
EVT_MENU( ID_GEN_PLOT_DXF, SCH_EDIT_FRAME::ToPlot_DXF )
EVT_MENU( ID_GEN_COPY_SHEET_TO_CLIPBOARD, EDA_DRAW_FRAME::CopyToClipboard )
EVT_MENU( ID_GEN_COPY_BLOCK_TO_CLIPBOARD, EDA_DRAW_FRAME::CopyToClipboard )
EVT_MENU( wxID_EXIT, SCH_EDIT_FRAME::OnExit )
EVT_MENU( ID_POPUP_SCH_COPY_ITEM, SCH_EDIT_FRAME::OnCopySchematicItemRequest )
......@@ -717,6 +717,21 @@ void SCH_EDIT_FRAME::SVG_Print( wxCommandEvent& event )
frame.ShowModal();
}
/*
* Function PrintPage (virtual)
* Previously used to print a page,
* but now only used to plot/print the current sheet to the clipboard
* @param aDC = wxDC given by the calling print function
* @param aPrintMask = not used here
* @param aPrintMirrorMode = not used here (Set when printing in mirror mode)
* @param aData = a pointer on an auxiliary data (not used here)
*/
void SCH_EDIT_FRAME::PrintPage( wxDC* aDC, int aPrintMask,
bool aPrintMirrorMode, void* aData)
{
GetScreen()->Draw( DrawPanel, aDC, GR_DEFAULT_DRAWMODE );
TraceWorkSheet( aDC, GetScreen(), g_DrawDefaultLineThickness );
}
void SCH_EDIT_FRAME::OnSelectItem( wxCommandEvent& aEvent )
{
......
......@@ -112,7 +112,7 @@ void SCH_EDIT_FRAME::ReCreateHToolbar()
_( "Generate bill of materials and/or cross references" ) );
m_HToolBar->AddTool( ID_BACKANNO_ITEMS, wxEmptyString, wxBitmap( backanno_xpm ),
_( "Back bnnotate component foot prints" ) );
_( "Back annotate component foot prints" ) );
// after adding the tools to the toolbar, must call Realize() to reflect the changes
m_HToolBar->Realize();
......
......@@ -34,7 +34,7 @@ void GERBVIEW_FRAME::ReCreateHToolbar( void )
m_HToolBar = new WinEDA_Toolbar( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
// Set up toolbar
m_HToolBar->AddTool( ID_NEW_BOARD, wxEmptyString, wxBitmap( gerbview_clear_layers_xpm ),
m_HToolBar->AddTool( ID_GERBVIEW_ERASE_ALL, wxEmptyString, wxBitmap( gerbview_clear_layers_xpm ),
_( "Erase all layers" ) );
m_HToolBar->AddTool( wxID_FILE, wxEmptyString, wxBitmap( gerber_file_xpm ),
......
......@@ -17,7 +17,6 @@
class LIB_EDIT_FRAME;
class LIB_VIEW_FRAME;
class DRAWSEGMENT;
class DrawPickedStruct;
class SCH_ITEM;
class SCH_NO_CONNECT;
class CMP_LIBRARY;
......@@ -743,6 +742,17 @@ public:
void LoadLibraries( void );
/** Virtual function PrintPage
* Previously used to print a page,
* but now only used to plot/print the current sheet to the clipboard
* @param aDC = wxDC given by the calling print function
* @param aPrintMask = not used here
* @param aPrintMirrorMode = not used here (Set when printing in mirror mode)
* @param aData = a pointer on an auxiliary data (not always used, NULL if not used)
*/
virtual void PrintPage( wxDC* aDC, int aPrintMask,
bool aPrintMirrorMode, void* aData = NULL );
DECLARE_EVENT_TABLE()
};
......
......@@ -17,7 +17,7 @@
; General Product Description Definitions
!define PRODUCT_NAME "KiCad"
!define PRODUCT_VERSION "2011.03.25"
!define PRODUCT_VERSION "2011.03.28"
!define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
!define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/"
!define COMPANY_NAME ""
......
release version:
2011 mar 17
files (.zip,.tgz):
kicad-2011-03-25
kicad-2011-03-28
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