Use double instead float when possible, ande code cleaning.

change EXCHG macro to equivalent inline functions
(better code compatibility with some compilers)
This commit is contained in:
charras
2008-10-30 10:55:46 +00:00
parent abd75ea366
commit 78bbe94923
12 changed files with 209 additions and 110 deletions
+17 -9
View File
@@ -119,6 +119,7 @@ public:
public:
WinEDA_PlotFrame( WinEDA_BasePcbFrame* parent );
private:
void OnInitDialog( wxInitDialogEvent& event );
void Plot( wxCommandEvent& event );
void OnQuit( wxCommandEvent& event );
void OnClose( wxCloseEvent& event );
@@ -130,6 +131,7 @@ private:
};
BEGIN_EVENT_TABLE( WinEDA_PlotFrame, wxDialog )
EVT_INIT_DIALOG( WinEDA_PlotFrame::OnInitDialog )
EVT_CLOSE( WinEDA_PlotFrame::OnClose )
EVT_BUTTON( wxID_CANCEL, WinEDA_PlotFrame::OnQuit )
EVT_BUTTON( ID_EXEC_PLOT, WinEDA_PlotFrame::Plot )
@@ -149,18 +151,25 @@ WinEDA_PlotFrame::WinEDA_PlotFrame( WinEDA_BasePcbFrame* parent ) :
wxDEFAULT_DIALOG_STYLE )
/********************************************************************/
{
m_Parent = parent;
Centre();
}
/**************************************************************/
void WinEDA_PlotFrame::OnInitDialog( wxInitDialogEvent& event )
/**************************************************************/
{
wxButton* button;
m_Parent = parent;
BOARD* board = parent->m_Pcb;
BOARD* board = m_Parent->m_Pcb;
wxConfig* config = m_Parent->m_Parent->m_EDA_Config; // Current config used by application
SetFont( *g_DialogFont );
Centre();
m_Plot_Sheet_Ref = NULL;
wxBoxSizer* MainBoxSizer = new wxBoxSizer( wxHORIZONTAL );
@@ -443,17 +452,16 @@ WinEDA_PlotFrame::WinEDA_PlotFrame( WinEDA_BasePcbFrame* parent ) :
MidLeftBoxSizer->Add( m_HPGL_PlotCenter_Opt, 0, wxGROW | wxALL, 5 );
// Mise a jour des activations des menus:
wxCommandEvent event;
SetCommands( event );
wxCommandEvent cmd_event;
SetCommands( cmd_event );
GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this );
// without this line, the ESC key does not work
m_PlotButton->SetFocus();
SetFocus();
}
/***************************************************************/
void WinEDA_PlotFrame::OnQuit( wxCommandEvent& WXUNUSED (event) )
/***************************************************************/