Commit 098a20a0 authored by jean-pierre charras's avatar jean-pierre charras

fix very minor bugs.

parent 9e0e43e4
......@@ -31,7 +31,7 @@ void CheckGLError()
{
GLenum errLast = GL_NO_ERROR;
for ( ;; )
for ( ; ; )
{
GLenum err = glGetError();
if ( err == GL_NO_ERROR )
......
......@@ -547,8 +547,8 @@ void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
case WS_SEGMENT:
{
wxPoint auxpos;
auxpos.x = ( ref.x - WsItem->m_Endx ) * conv_unit;;
auxpos.y = ( ref.y - WsItem->m_Endy ) * conv_unit;;
auxpos.x = ( ref.x - WsItem->m_Endx ) * conv_unit;
auxpos.y = ( ref.y - WsItem->m_Endy ) * conv_unit;
plotter->move_to( pos );
plotter->finish_to( auxpos );
}
......
......@@ -68,7 +68,7 @@ int Clamp_Text_PenSize( int aPenSize, wxSize aSize, bool aBold )
{
int size = MIN( ABS( aSize.x ), ABS( aSize.y ) );
return Clamp_Text_PenSize( aPenSize, size, aBold );;
return Clamp_Text_PenSize( aPenSize, size, aBold );
}
......
......@@ -321,7 +321,7 @@ void CVPCB_MAINFRAME::OnChar( wxKeyEvent& event )
case WXK_RIGHT:
case WXK_NUMPAD_RIGHT:
m_FootprintList->SetFocus();;
m_FootprintList->SetFocus();
break;
default:
......
......@@ -491,7 +491,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx
bool aErase )
{
BASE_SCREEN* screen = aPanel->GetScreen();
BLOCK_SELECTOR* block = &screen->m_BlockLocate;;
BLOCK_SELECTOR* block = &screen->m_BlockLocate;
SCH_ITEM* schitem;
/* Erase old block contents. */
......
......@@ -74,7 +74,7 @@ SCH_BUS_ENTRY* SCH_EDIT_FRAME::CreateBusEntry( wxDC* DC, int entry_type )
SCH_BUS_ENTRY* BusEntry = new SCH_BUS_ENTRY( GetScreen()->GetCrossHairPosition(), s_LastShape,
entry_type );
BusEntry->m_Flags = IS_NEW;
BusEntry->Place( this, DC );;
BusEntry->Place( this, DC );
OnModify();
return BusEntry;
}
......
......@@ -636,7 +636,7 @@ bool CMP_LIBRARY::LoadDocs( wxString& aErrorMsg )
{
if( strncmp( line, "$ENDCMP", 7 ) == 0 )
break;
text = strtok( line + 2, "\n\r" );;
text = strtok( line + 2, "\n\r" );
if( entry )
{
......
......@@ -225,7 +225,7 @@ void SCH_EDIT_FRAME::BuildNetListBase()
/* Updating the Bus Labels Netcode connected by Bus */
ConnectBusLabels( g_NetObjectslist );
activity << wxT( ", " ) << _( "bus labels" ) << wxT( "..." );;
activity << wxT( ", " ) << _( "bus labels" ) << wxT( "..." );
SetStatusText( activity );
/* Group objects by label. */
......@@ -804,7 +804,7 @@ int IsBusLabel( const wxString& LabelDrawList )
}
if( !BufLine.ToLong( &tmp ) )
error = TRUE;
error = true;
FirstNumWireBus = tmp;
while( LabelDrawList[Num] == '.' && Num < LabelDrawList.Len() )
......@@ -818,7 +818,7 @@ int IsBusLabel( const wxString& LabelDrawList )
}
if( !BufLine.ToLong( &tmp ) )
error = TRUE;;
error = true;
LastNumWireBus = tmp;
if( FirstNumWireBus < 0 )
......
......@@ -52,7 +52,7 @@ static void PlotLibPart( PLOTTER* plotter, SCH_COMPONENT* DrawLibItem )
Entry = CMP_LIBRARY::FindLibraryComponent( DrawLibItem->GetLibName() );
if( Entry == NULL )
return;;
return;
temp = DrawLibItem->GetTransform();
......
......@@ -479,7 +479,7 @@ bool SCH_TEXT::Load( LINE_READER& aLine, wxString& aErrorMsg )
}
wxString val = FROM_UTF8( text );
for( ;; )
for( ; ; )
{
int i = val.find( wxT( "\\n" ) );
......
......@@ -488,7 +488,7 @@ static void addHoleToPolygon( std::vector<wxPoint>& aBuffer,
void D_CODE::ConvertShapeToPolygon()
{
wxPoint initialpos;
wxPoint currpos;;
wxPoint currpos;
m_PolyCorners.clear();
......
......@@ -167,6 +167,7 @@ public:
void OnUpdateTraceDrawMode( wxUpdateUIEvent& aEvent );
void OnUpdateHighContrastDisplayMode( wxUpdateUIEvent& aEvent );
void OnUpdateShowLayerManager( wxUpdateUIEvent& aEvent );
void OnUpdateShowMicrowaveToolbar( wxUpdateUIEvent& aEvent );
void OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent );
void OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent );
void OnUpdateZoneDisplayStyle( wxUpdateUIEvent& aEvent );
......@@ -215,7 +216,7 @@ public:
virtual void SetGridColor(int aColor);
// Configurations:
void InstallConfigFrame( const wxPoint& pos );
void InstallConfigFrame( );
void Process_Config( wxCommandEvent& event );
PARAM_CFG_ARRAY& GetProjectFileParameters();
......
......@@ -808,7 +808,7 @@ void CreateThermalReliefPadPolygon( std::vector<CPolyPt>& aCornerBuffer,
aCornerBuffer.push_back( CPolyPt( cpos.x, cpos.y ) );
}
aCornerBuffer.back().end_contour = true;;
aCornerBuffer.back().end_contour = true;
angle += 1800; // this is calculate hole 3
if( angle >= 3600 )
angle -= 3600;
......
......@@ -12,21 +12,21 @@
#include <wx/listimpl.cpp>
/* creates a BOM list rom board
The format is:
"Id";"Designator";"Package";"Number";"Designation";"Supplier and ref";
1;"P1";"DB25FC";1;"DB25FEMELLE";;;
2;"U9";"PGA120";1;"4003APG120";;;
3;"JP1";"pin_array_8x2";1;"CONN_8X2";;;
4;"RR1";"r_pack9";1;"9x1K";;;
5;"X1";"HC-18UH";1;"8MHz";;;
6;"U8";"24dip300";1;"EP600";;;
7;"U5";"32dip600";1;"628128";;;
8;"C2,C3";"C1";2;"47pF";;;
9;"U1";"20dip300";1;"74LS245";;;
10;"U3";"20dip300";1;"74LS541";;;
11;"U2";"20dip300";1;"74LS688";;;
12;"C1,C4,C5,C6";"CP6";4;"47uF";;;
*/
* The format is:
* "Id";"Designator";"Package";"Number";"Designation";"Supplier and ref";
* 1;"P1";"DB25FC";1;"DB25FEMELLE";;;
* 2;"U9";"PGA120";1;"4003APG120";;;
* 3;"JP1";"pin_array_8x2";1;"CONN_8X2";;;
* 4;"RR1";"r_pack9";1;"9x1K";;;
* 5;"X1";"HC-18UH";1;"8MHz";;;
* 6;"U8";"24dip300";1;"EP600";;;
* 7;"U5";"32dip600";1;"628128";;;
* 8;"C2,C3";"C1";2;"47pF";;;
* 9;"U1";"20dip300";1;"74LS245";;;
* 10;"U3";"20dip300";1;"74LS541";;;
* 11;"U2";"20dip300";1;"74LS688";;;
* 12;"C1,C4,C5,C6";"CP6";4;"47uF";;;
*/
const wxString CsvFileExtension( wxT( "csv" ) ); // BOM file extension
......@@ -83,13 +83,13 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent )
}
// Write header:
msg = wxT( "\"");
msg << _("Id") << wxT("\";\"");
msg << _("Designator") << wxT("\";\"");
msg << _("Package") << wxT("\";\"");
msg << _("Quantity") << wxT("\";\"");
msg << _("Designation") << wxT("\";\"");
msg << _("Supplier and ref") << wxT("\";\n" );
msg = wxT( "\"" );
msg << _( "Id" ) << wxT( "\";\"" );
msg << _( "Designator" ) << wxT( "\";\"" );
msg << _( "Package" ) << wxT( "\";\"" );
msg << _( "Quantity" ) << wxT( "\";\"" );
msg << _( "Designation" ) << wxT( "\";\"" );
msg << _( "Supplier and ref" ) << wxT( "\";\n" );
fprintf( FichBom, "%s", TO_UTF8( msg ) );
// Build list
......@@ -97,7 +97,7 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent )
cmp* comp = NULL;
CmpList::iterator iter;
int i = 1;
while (Module != NULL)
while( Module != NULL )
{
bool valExist = false;
......@@ -119,11 +119,11 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent )
// If component does not exist yet, create new one and append it to the list.
if( valExist == false )
{
comp = new cmp();
comp->m_Id = i++;
comp->m_Val = Module->m_Value->m_Text;
comp->m_Ref = Module->m_Reference->m_Text;
comp->m_Pkg = Module->m_LibRef;
comp = new cmp();
comp->m_Id = i++;
comp->m_Val = Module->m_Value->m_Text;
comp->m_Ref = Module->m_Reference->m_Text;
comp->m_Pkg = Module->m_LibRef;
comp->m_CmpCount = 1;
list.Append( comp );
}
......
......@@ -75,7 +75,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
break;
case TYPE_TEXTE:
text << _( "Pcb Text" ) << wxT( " " );;
text << _( "Pcb Text" ) << wxT( " " );
if( ( (TEXTE_PCB*) item )->m_Text.Len() < 12 )
text << ( (TEXTE_PCB*) item )->m_Text;
else
......
......@@ -755,7 +755,7 @@ void MODULE::SetRectangleExinscrit()
*/
EDA_Rect MODULE::GetBoundingBox() const
{
EDA_Rect area = GetFootPrintRect();;
EDA_Rect area = GetFootPrintRect();
// Calculate extended area including text field:
EDA_Rect text_area;
......
......@@ -20,32 +20,33 @@
void PCB_EDIT_FRAME::InstallDisplayOptionsDialog( wxCommandEvent& aEvent )
{
Dialog_Display_Options* DisplayOptionsDialog =
new Dialog_Display_Options( this );
DisplayOptionsDialog->ShowModal();
DisplayOptionsDialog->Destroy();
DIALOG_DISPLAY_OPTIONS dlg( this );
dlg.ShowModal();
}
/*******************************************************************************/
Dialog_Display_Options::Dialog_Display_Options( PCB_EDIT_FRAME* parent ) :
DialogDisplayOptions_base(parent)
DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS( PCB_EDIT_FRAME* parent ) :
DIALOG_DISPLAY_OPTIONS_BASE(parent)
/*******************************************************************************/
{
m_Parent = parent;
init();
GetSizer()->SetSizeHints( this );
}
/****************************************************************/
void Dialog_Display_Options::init()
void DIALOG_DISPLAY_OPTIONS::init()
/****************************************************************/
{
SetFocus();
if ( DisplayOpt.DisplayPcbTrackFill )
m_OptDisplayTracks->SetSelection(1);
else
m_OptDisplayTracks->SetSelection(0);
switch ( DisplayOpt.ShowTrackClearanceMode )
{
......@@ -84,31 +85,26 @@ void Dialog_Display_Options::init()
m_OptDisplayPadNoConn->SetValue( m_Parent->IsElementVisible( PCB_VISIBLE(NO_CONNECTS_VISIBLE) ) );
m_OptDisplayDrawings->SetSelection( DisplayOpt.DisplayDrawItems );
m_ShowNetNamesOption->SetSelection( DisplayOpt.DisplayNetNamesMode);
if( GetSizer() )
{
GetSizer()->SetSizeHints( this );
}
}
/*****************************************************************/
void Dialog_Display_Options::OnCancelClick( wxCommandEvent& event )
void DIALOG_DISPLAY_OPTIONS::OnCancelClick( wxCommandEvent& event )
/*****************************************************************/
{
event.Skip();
EndModal(0);
}
/*************************************************************************/
void Dialog_Display_Options::OnOkClick(wxCommandEvent& event)
void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event)
/*************************************************************************/
/* Update variables with new options
*/
{
if ( m_Show_Page_Limits->GetSelection() == 0 ) g_ShowPageLimits = TRUE;
if ( m_Show_Page_Limits->GetSelection() == 0 ) g_ShowPageLimits = true;
else g_ShowPageLimits = FALSE;
if ( m_OptDisplayTracks->GetSelection() == 1)
DisplayOpt.DisplayPcbTrackFill = TRUE;
DisplayOpt.DisplayPcbTrackFill = true;
else DisplayOpt.DisplayPcbTrackFill = FALSE;
m_Parent->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill;
......@@ -158,7 +154,7 @@ void Dialog_Display_Options::OnOkClick(wxCommandEvent& event)
DisplayOpt.DisplayDrawItems = m_OptDisplayDrawings->GetSelection();
DisplayOpt.DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection();
m_Parent->DrawPanel->Refresh(TRUE);
m_Parent->DrawPanel->Refresh();
EndModal(1);
}
......@@ -3,7 +3,7 @@
*/
#include "dialog_display_options_base.h"
class Dialog_Display_Options : public DialogDisplayOptions_base
class DIALOG_DISPLAY_OPTIONS : public DIALOG_DISPLAY_OPTIONS_BASE
{
private:
PCB_EDIT_FRAME* m_Parent;
......@@ -11,8 +11,8 @@ private:
void init();
public:
Dialog_Display_Options( PCB_EDIT_FRAME* parent );
~Dialog_Display_Options( ) { };
DIALOG_DISPLAY_OPTIONS( PCB_EDIT_FRAME* parent );
~DIALOG_DISPLAY_OPTIONS( ) { };
void OnOkClick( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event );
};
......
This source diff could not be displayed because it is too large. You can view the blob instead.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_display_options_base__
#define __dialog_display_options_base__
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/radiobox.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/checkbox.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DialogDisplayOptions_base
///////////////////////////////////////////////////////////////////////////////
class DialogDisplayOptions_base : public wxDialog
{
private:
protected:
enum
{
wxID_DISPLAY_TRACK = 1000,
ID_SHOW_CLEARANCE,
ID_VIAS_HOLES,
ID_EDGES_MODULES,
ID_TEXT_MODULES,
ID_PADS_SHAPES,
ID_VIAS_SHAPES,
};
wxRadioBox* m_OptDisplayTracks;
wxRadioBox* m_OptDisplayTracksClearance;
wxRadioBox* m_OptDisplayViaHole;
wxRadioBox* m_ShowNetNamesOption;
wxRadioBox* m_OptDisplayModEdges;
wxRadioBox* m_OptDisplayModTexts;
wxRadioBox* m_OptDisplayPads;
wxRadioBox* m_OptDisplayVias;
wxCheckBox* m_OptDisplayPadClearence;
wxCheckBox* m_OptDisplayPadNumber;
wxCheckBox* m_OptDisplayPadNoConn;
wxRadioBox* m_OptDisplayDrawings;
wxRadioBox* m_Show_Page_Limits;
wxButton* m_buttonOK;
wxButton* m_buttonCANCEL;
// Virtual event handlers, overide them in your derived class
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
public:
DialogDisplayOptions_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Display options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 731,331 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DialogDisplayOptions_base();
};
#endif //__dialog_display_options_base__
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 17 2010)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_display_options_base__
#define __dialog_display_options_base__
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/radiobox.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/checkbox.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_DISPLAY_OPTIONS_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_DISPLAY_OPTIONS_BASE : public wxDialog
{
private:
protected:
enum
{
wxID_DISPLAY_TRACK = 1000,
ID_VIAS_SHAPES,
ID_VIAS_HOLES,
ID_SHOW_CLEARANCE,
ID_EDGES_MODULES,
ID_TEXT_MODULES,
ID_PADS_SHAPES,
};
wxRadioBox* m_OptDisplayTracks;
wxRadioBox* m_OptDisplayVias;
wxRadioBox* m_OptDisplayViaHole;
wxRadioBox* m_ShowNetNamesOption;
wxRadioBox* m_OptDisplayTracksClearance;
wxRadioBox* m_OptDisplayModEdges;
wxRadioBox* m_OptDisplayModTexts;
wxRadioBox* m_OptDisplayPads;
wxCheckBox* m_OptDisplayPadClearence;
wxCheckBox* m_OptDisplayPadNumber;
wxCheckBox* m_OptDisplayPadNoConn;
wxRadioBox* m_OptDisplayDrawings;
wxRadioBox* m_Show_Page_Limits;
wxButton* m_buttonOK;
wxButton* m_buttonCANCEL;
// Virtual event handlers, overide them in your derived class
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
public:
DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Display options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 731,291 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_DISPLAY_OPTIONS_BASE();
};
#endif //__dialog_display_options_base__
......@@ -172,12 +172,9 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools );
m_auimgr.Update();
if( m_show_layer_manager_tools )
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
_("Hide &Layers Manager" ) );
else
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
_("Show &Layers Manager" ) );
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
m_show_layer_manager_tools ?
_("Hide &Layers Manager" ) : _("Show &Layers Manager" ) );
break;
default:
......
......@@ -21,7 +21,7 @@
/*****************************************************************/
void PCB_EDIT_FRAME::InstallConfigFrame( const wxPoint& pos )
void PCB_EDIT_FRAME::InstallConfigFrame( )
/*****************************************************************/
{
DIALOG_PCBNEW_CONFIG_LIBS dialog( this );
......
......@@ -105,7 +105,7 @@ DIMENSION_EDITOR_DIALOG::DIMENSION_EDITOR_DIALOG( PCB_EDIT_FRAME* parent,
wxDefaultPosition, wxSize( -1, -1 ), 2, display_msg,
1, wxRA_SPECIFY_COLS );
if( Dimension->m_Text->m_Mirror )
m_Mirror->SetSelection( 1 );;
m_Mirror->SetSelection( 1 );
RightBoxSizer->Add( m_Mirror, 0, wxGROW | wxALL, 5 );
m_Name = new WinEDA_EnterText( this, wxT( "Text:" ),
......
......@@ -213,7 +213,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
break;
case ID_DRC_CONTROL:
m_drc->ShowDialog();;
m_drc->ShowDialog();
break;
case ID_GET_NETLIST:
......@@ -513,7 +513,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
{
// Remove filled areas in zone
ZONE_CONTAINER* zone_container = GetBoard()->GetArea( ii );
zone_container->m_FilledPolysList.clear();;
zone_container->m_FilledPolysList.clear();
}
SetCurItem( NULL ); // CurItem might be deleted by this command, clear the pointer
......
......@@ -241,7 +241,7 @@ bool PCB_EDIT_FRAME::Reset_All_Tracks_And_Vias_To_Netclass_Values( bool aTrack,
if( (pt_segm->Type() == TYPE_TRACK ) && aTrack )
{
if( SetTrackSegmentWidth( pt_segm, &itemsListPicker, true ) )
change = true;;
change = true;
}
}
......
......@@ -494,7 +494,7 @@ void CreateSignalsSection( FILE* file, BOARD* pcb )
// connection)
{
wxString msg; msg << wxT( "NoConnection" ) << NbNoConn++;
net->SetNetname( msg );;
net->SetNetname( msg );
}
if( net->GetNet() <= 0 ) // dummy netlist (no connection)
......
......@@ -225,7 +225,7 @@ bool MODULE::Read_GPCB_Descr( const wxString& CmpFullFileName )
}
m_Reference->m_Pos.x = wxRound( ibuf[2] * conv_unit );
m_Reference->m_Pos.y = wxRound( ibuf[3] * conv_unit );;
m_Reference->m_Pos.y = wxRound( ibuf[3] * conv_unit );
m_Reference->m_Orient = ibuf[4] * 900;
// Calculate size: default is 40 mils (400 pcb units)
......
......@@ -97,7 +97,7 @@ void Place_1_Pad_Board( BOARD* Pcb,
int op_logique )
{
int dx, dy;
wxPoint shape_pos = pt_pad->ReturnShapePos();;
wxPoint shape_pos = pt_pad->ReturnShapePos();
dx = pt_pad->m_Size.x / 2; dx += marge;
......
......@@ -232,7 +232,7 @@ int PCB_BASE_FRAME::ReadGeneralDescrPcb( LINE_READER* aReader )
if( stricmp( data, "BoardThickness" ) == 0 )
{
data = strtok( NULL, " =\n\r" );
GetBoard()->GetBoardDesignSettings()->m_BoardThickness = atoi( data );;
GetBoard()->GetBoardDesignSettings()->m_BoardThickness = atoi( data );
continue;
}
......@@ -269,7 +269,7 @@ int PCB_BASE_FRAME::ReadGeneralDescrPcb( LINE_READER* aReader )
if( stricmp( data, "Ndraw" ) == 0 )
{
data = strtok( NULL, " =\n\r" );
NbDraw = atoi( data );;
NbDraw = atoi( data );
continue;
}
......
......@@ -476,7 +476,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// Colors and Visibility are also handled by the layers manager toolbar
item = new wxMenuItem( configmenu, ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
_( "Hide &Layers Manager" ),
m_show_layer_manager_tools ?
_( "Hide &Layers Manager" ) : _("Show &Layers Manager" ),
HELP_SHOW_HIDE_LAYERMANAGER );
item->SetBitmap( layers_manager_xpm );
configmenu->Append( item );
......
......@@ -128,7 +128,7 @@ void WinEDA_ModuleEditFrame::GetComponentFromUndoList( wxCommandEvent& event )
GetBoard()->Add( module, ADD_APPEND );
SetCurItem( NULL );;
SetCurItem( NULL );
OnModify();
DrawPanel->Refresh();
......
......@@ -218,8 +218,10 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, PCB_EDIT_FRAME::OnUpdateTraceDrawMode )
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
PCB_EDIT_FRAME::OnUpdateHighContrastDisplayMode )
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1,
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR,
PCB_EDIT_FRAME::OnUpdateShowLayerManager )
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1,
PCB_EDIT_FRAME::OnUpdateShowMicrowaveToolbar )
EVT_UPDATE_UI( ID_NO_TOOL_SELECTED, PCB_EDIT_FRAME::OnUpdateVerticalToolbar )
EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, PCB_EDIT_FRAME::OnUpdateSelectTrackWidth )
EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH,
......@@ -344,29 +346,30 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title,
lyrs.IsFloatable();
if( m_HToolBar )
if( m_HToolBar ) // The main horizontal toolbar
{
m_auimgr.AddPane( m_HToolBar,
wxAuiPaneInfo( horiz_tb ).Name( wxT( "m_HToolBar" ) ).Top().Row( 0 ) );
}
if( m_AuxiliaryToolBar )
if( m_AuxiliaryToolBar ) // the auxiliary horizontal toolbar, that shows track and via sizes, zoom ...)
{
m_auimgr.AddPane( m_AuxiliaryToolBar,
wxAuiPaneInfo( horiz_tb ).Name( wxT( "m_AuxiliaryToolBar" ) ).Top().Row( 1 ) );
}
if( m_AuxVToolBar )
if( m_AuxVToolBar ) // The auxiliary vertical toolbar (currently microwave tools)
m_auimgr.AddPane( m_AuxVToolBar,
wxAuiPaneInfo( vert ).Name( wxT( "m_AuxVToolBar" ) ).Right().Row( 2 ).Hide() );
if( m_VToolBar )
if( m_VToolBar ) // The main right vertical toolbar
m_auimgr.AddPane( m_VToolBar,
wxAuiPaneInfo( vert ).Name( wxT( "m_VToolBar" ) ).Right().Row( 1 ) );
// Add the layer manager (right side of pcbframe)
m_auimgr.AddPane( m_Layers, lyrs.Name( wxT( "m_LayersManagerToolBar" ) ).Right().Row( 0 ) );
if( m_OptionsToolBar )
if( m_OptionsToolBar ) // The left vertical toolbar
{
m_auimgr.AddPane( m_OptionsToolBar,
wxAuiPaneInfo( vert ).Name( wxT( "m_OptionsToolBar" ) ).Left()
......
......@@ -30,28 +30,18 @@
void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
{
int id = event.GetId();
wxPoint pos;
wxFileName fn;
pos = GetPosition();
pos.x += 20;
pos.y += 20;
switch( id )
{
case ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG:
if( m_OptionsToolBar )
{ //This command is same as the Options Vertical Toolbar
// tool Show/hide layers manager
bool state =
m_OptionsToolBar->GetToolState( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR,
!state );
wxCommandEvent event( wxEVT_COMMAND_TOOL_CLICKED,
ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR );
wxPostEvent( this, event );
}
m_show_layer_manager_tools = ! m_show_layer_manager_tools;
m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools );
m_auimgr.Update();
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
m_show_layer_manager_tools ?
_("Hide &Layers Manager" ) : _("Show &Layers Manager" ));
break;
case ID_PCB_LAYERS_SETUP:
......@@ -59,7 +49,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
break;
case ID_CONFIG_REQ:
InstallConfigFrame( pos );
InstallConfigFrame();
break;
case ID_PCB_MASK_CLEARANCE:
......@@ -127,7 +117,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
break;
default:
DisplayError( this, wxT( "PCB_EDIT_FRAME::Process_Config internal error" ) );
DisplayError( this, wxT( "PCB_EDIT_FRAME::Process_Config error" ) );
}
}
......@@ -152,7 +142,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName )
/* Initialize default values. */
g_LibName_List.Clear();
wxGetApp().ReadProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters(), FALSE );
wxGetApp().ReadProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParameters(), false );
/* User library path takes precedent over default library search paths. */
wxGetApp().InsertLibraryPath( g_UserLibDirBuffer, 1 );
......@@ -167,7 +157,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName )
SetVisibleAlls();
SetElementVisibility( GRID_VISIBLE, showGrid );
SetElementVisibility( RATSNEST_VISIBLE, showRats );
return TRUE;
return true;
}
......@@ -215,8 +205,6 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetProjectFileParameters()
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "BoardThickness" ),
&boardDesignSettings.m_BoardThickness,
630, 0, 0xFFFF ) );
m_projectFileParams.push_back( new PARAM_CFG_BOOL( wxT( "SgPcb45" ), &Segments_45_Only,
TRUE ) );
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "TxtPcbV" ),
&boardDesignSettings.m_PcbTextSize.y,
600, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE ) );
......@@ -271,32 +259,39 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings()
if( !m_configSettings.empty() )
return m_configSettings;
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ViaSHole" ),
// Units used in dialogs and toolbars
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "Units" ), (int*)&g_UserUnit, MILLIMETRES ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "DisplayPolarCoords" ),
&DisplayOpt.DisplayPolarCood, false ) );
// Display options and modes:
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ViaHoleDisplayMode" ),
&DisplayOpt.m_DisplayViaMode,
VIA_SPECIAL_HOLE_SHOW, VIA_HOLE_NOT_SHOW,
OPT_VIA_HOLE_END - 1 ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ShowNetNamesMode" ),
&DisplayOpt.DisplayNetNamesMode, 3, 0, 3 ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "Unite" ), (int*)&g_UserUnit, MILLIMETRES ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "SegFill" ),
&DisplayOpt.DisplayPcbTrackFill, TRUE ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "DisplayTrackFilled" ),
&DisplayOpt.DisplayPcbTrackFill, true ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "TrackDisplayClearance" ),
&DisplayOpt.ShowTrackClearanceMode,
SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadFill" ),
&DisplayOpt.DisplayPadFill, TRUE ) );
&DisplayOpt.DisplayPadFill, true ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "ViaFill" ),
&DisplayOpt.DisplayViaFill, TRUE ) );
&DisplayOpt.DisplayViaFill, true ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadAffG" ),
&DisplayOpt.DisplayPadIsol, TRUE ) );
&DisplayOpt.DisplayPadIsol, true ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadSNum" ),
&DisplayOpt.DisplayPadNum, TRUE ) );
&DisplayOpt.DisplayPadNum, true ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ModAffC" ),
&DisplayOpt.DisplayModEdge, FILLED, 0, 2 ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ModAffT" ),
&DisplayOpt.DisplayModText, FILLED, 0, 2 ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "PcbAffT" ),
&DisplayOpt.DisplayDrawItems, FILLED, 0, 2 ) );
// Colors:
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay0" ), LOC_COLOR( 0 ),
GREEN ) );
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay1" ), LOC_COLOR( 1 ),
......@@ -388,15 +383,17 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings()
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CoRatsN" ),
ITEM_COLOR( RATSNEST_VISIBLE ),
WHITE ) );
// Miscellaneous:
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "TimeOut" ), &g_TimeOut,
600, 0, 60000 ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "DPolair" ),
&DisplayOpt.DisplayPolarCood, FALSE ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "MaxLnkS" ), &g_MaxLinksShowed,
3, 0, 15 ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "ShowMRa" ),
&g_Show_Module_Ratsnest, TRUE ) );
&g_Show_Module_Ratsnest, true ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "TwoSegT" ),
&g_TwoSegmentTrackBuild, TRUE ) );
&g_TwoSegmentTrackBuild, true ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "SegmPcb45Only" ), &Segments_45_Only,
true ) );
return m_configSettings;
}
......@@ -156,6 +156,11 @@ void PCB_EDIT_FRAME::OnUpdateHighContrastDisplayMode( wxUpdateUIEvent& aEvent )
void PCB_EDIT_FRAME::OnUpdateShowLayerManager( wxUpdateUIEvent& aEvent )
{
aEvent.Check( m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).IsShown() );
}
void PCB_EDIT_FRAME::OnUpdateShowMicrowaveToolbar( wxUpdateUIEvent& aEvent )
{
aEvent.Check( m_auimgr.GetPane( wxT( "m_AuxVToolBar" ) ).IsShown() );
}
......
......@@ -143,12 +143,18 @@ int PCB_EDIT_FRAME::Fill_All_Zones( bool verbose )
int errorLevel = 0;
int areaCount = GetBoard()->GetAreaCount();
wxBusyCursor dummyCursor;
wxString msg;
#define FORMAT_STRING _( "Filling zone %d out of %d (net %s)..." )
wxProgressDialog progressDialog( wxT( "Fill All Zones" ),
wxT( "Starting zone fill..." ),
// Create a message with a long net name, and build a wxProgressDialog
// with a correct size to show this long net name
msg.Printf( FORMAT_STRING,
000, 999, wxT("XXXXXXXXXXXXXXXXX" ) );
wxProgressDialog progressDialog( _( "Fill All Zones" ), msg,
areaCount+2, this,
wxPD_AUTO_HIDE | wxPD_APP_MODAL | wxPD_CAN_ABORT );
progressDialog.SetMinSize( wxSize( 400, 100 ) );
// Display the actual message
progressDialog.Update( 0, _( "Starting zone fill..." ) );
// Remove segment zones
GetBoard()->m_Zone.DeleteAll();
......@@ -157,11 +163,10 @@ int PCB_EDIT_FRAME::Fill_All_Zones( bool verbose )
for( ii = 0; ii < areaCount; ii++ )
{
ZONE_CONTAINER* zoneContainer = GetBoard()->GetArea( ii );
wxString str;
str.Printf( wxT( "Filling zone %d out of %d (net %s)..." ),
msg.Printf( FORMAT_STRING,
ii+1, areaCount, GetChars( zoneContainer->GetNetName() ) );
if( !progressDialog.Update( ii+1, str ) )
if( !progressDialog.Update( ii+1, msg ) )
break;
errorLevel = Fill_Zone( zoneContainer, verbose );
......@@ -169,7 +174,7 @@ int PCB_EDIT_FRAME::Fill_All_Zones( bool verbose )
if( errorLevel && !verbose )
break;
}
progressDialog.Update( ii+2, wxT( "Updating ratsnest..." ) );
progressDialog.Update( ii+2, _( "Updating ratsnest..." ) );
test_connexions( NULL );
// Recalculate the active ratsnest, i.e. the unconnected links
......
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