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

fix very minor bugs.

parent 9e0e43e4
...@@ -31,7 +31,7 @@ void CheckGLError() ...@@ -31,7 +31,7 @@ void CheckGLError()
{ {
GLenum errLast = GL_NO_ERROR; GLenum errLast = GL_NO_ERROR;
for ( ;; ) for ( ; ; )
{ {
GLenum err = glGetError(); GLenum err = glGetError();
if ( err == GL_NO_ERROR ) if ( err == GL_NO_ERROR )
......
...@@ -547,8 +547,8 @@ void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen ) ...@@ -547,8 +547,8 @@ void EDA_DRAW_FRAME::PlotWorkSheet( PLOTTER* plotter, BASE_SCREEN* screen )
case WS_SEGMENT: case WS_SEGMENT:
{ {
wxPoint auxpos; wxPoint auxpos;
auxpos.x = ( ref.x - WsItem->m_Endx ) * conv_unit;; auxpos.x = ( ref.x - WsItem->m_Endx ) * conv_unit;
auxpos.y = ( ref.y - WsItem->m_Endy ) * conv_unit;; auxpos.y = ( ref.y - WsItem->m_Endy ) * conv_unit;
plotter->move_to( pos ); plotter->move_to( pos );
plotter->finish_to( auxpos ); plotter->finish_to( auxpos );
} }
......
...@@ -68,7 +68,7 @@ int Clamp_Text_PenSize( int aPenSize, wxSize aSize, bool aBold ) ...@@ -68,7 +68,7 @@ int Clamp_Text_PenSize( int aPenSize, wxSize aSize, bool aBold )
{ {
int size = MIN( ABS( aSize.x ), ABS( aSize.y ) ); 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 ) ...@@ -321,7 +321,7 @@ void CVPCB_MAINFRAME::OnChar( wxKeyEvent& event )
case WXK_RIGHT: case WXK_RIGHT:
case WXK_NUMPAD_RIGHT: case WXK_NUMPAD_RIGHT:
m_FootprintList->SetFocus();; m_FootprintList->SetFocus();
break; break;
default: default:
......
...@@ -491,7 +491,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx ...@@ -491,7 +491,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx
bool aErase ) bool aErase )
{ {
BASE_SCREEN* screen = aPanel->GetScreen(); BASE_SCREEN* screen = aPanel->GetScreen();
BLOCK_SELECTOR* block = &screen->m_BlockLocate;; BLOCK_SELECTOR* block = &screen->m_BlockLocate;
SCH_ITEM* schitem; SCH_ITEM* schitem;
/* Erase old block contents. */ /* Erase old block contents. */
......
...@@ -74,7 +74,7 @@ SCH_BUS_ENTRY* SCH_EDIT_FRAME::CreateBusEntry( wxDC* DC, int entry_type ) ...@@ -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, SCH_BUS_ENTRY* BusEntry = new SCH_BUS_ENTRY( GetScreen()->GetCrossHairPosition(), s_LastShape,
entry_type ); entry_type );
BusEntry->m_Flags = IS_NEW; BusEntry->m_Flags = IS_NEW;
BusEntry->Place( this, DC );; BusEntry->Place( this, DC );
OnModify(); OnModify();
return BusEntry; return BusEntry;
} }
......
...@@ -636,7 +636,7 @@ bool CMP_LIBRARY::LoadDocs( wxString& aErrorMsg ) ...@@ -636,7 +636,7 @@ bool CMP_LIBRARY::LoadDocs( wxString& aErrorMsg )
{ {
if( strncmp( line, "$ENDCMP", 7 ) == 0 ) if( strncmp( line, "$ENDCMP", 7 ) == 0 )
break; break;
text = strtok( line + 2, "\n\r" );; text = strtok( line + 2, "\n\r" );
if( entry ) if( entry )
{ {
......
...@@ -225,7 +225,7 @@ void SCH_EDIT_FRAME::BuildNetListBase() ...@@ -225,7 +225,7 @@ void SCH_EDIT_FRAME::BuildNetListBase()
/* Updating the Bus Labels Netcode connected by Bus */ /* Updating the Bus Labels Netcode connected by Bus */
ConnectBusLabels( g_NetObjectslist ); ConnectBusLabels( g_NetObjectslist );
activity << wxT( ", " ) << _( "bus labels" ) << wxT( "..." );; activity << wxT( ", " ) << _( "bus labels" ) << wxT( "..." );
SetStatusText( activity ); SetStatusText( activity );
/* Group objects by label. */ /* Group objects by label. */
...@@ -804,7 +804,7 @@ int IsBusLabel( const wxString& LabelDrawList ) ...@@ -804,7 +804,7 @@ int IsBusLabel( const wxString& LabelDrawList )
} }
if( !BufLine.ToLong( &tmp ) ) if( !BufLine.ToLong( &tmp ) )
error = TRUE; error = true;
FirstNumWireBus = tmp; FirstNumWireBus = tmp;
while( LabelDrawList[Num] == '.' && Num < LabelDrawList.Len() ) while( LabelDrawList[Num] == '.' && Num < LabelDrawList.Len() )
...@@ -818,7 +818,7 @@ int IsBusLabel( const wxString& LabelDrawList ) ...@@ -818,7 +818,7 @@ int IsBusLabel( const wxString& LabelDrawList )
} }
if( !BufLine.ToLong( &tmp ) ) if( !BufLine.ToLong( &tmp ) )
error = TRUE;; error = true;
LastNumWireBus = tmp; LastNumWireBus = tmp;
if( FirstNumWireBus < 0 ) if( FirstNumWireBus < 0 )
......
...@@ -52,7 +52,7 @@ static void PlotLibPart( PLOTTER* plotter, SCH_COMPONENT* DrawLibItem ) ...@@ -52,7 +52,7 @@ static void PlotLibPart( PLOTTER* plotter, SCH_COMPONENT* DrawLibItem )
Entry = CMP_LIBRARY::FindLibraryComponent( DrawLibItem->GetLibName() ); Entry = CMP_LIBRARY::FindLibraryComponent( DrawLibItem->GetLibName() );
if( Entry == NULL ) if( Entry == NULL )
return;; return;
temp = DrawLibItem->GetTransform(); temp = DrawLibItem->GetTransform();
......
...@@ -479,7 +479,7 @@ bool SCH_TEXT::Load( LINE_READER& aLine, wxString& aErrorMsg ) ...@@ -479,7 +479,7 @@ bool SCH_TEXT::Load( LINE_READER& aLine, wxString& aErrorMsg )
} }
wxString val = FROM_UTF8( text ); wxString val = FROM_UTF8( text );
for( ;; ) for( ; ; )
{ {
int i = val.find( wxT( "\\n" ) ); int i = val.find( wxT( "\\n" ) );
......
...@@ -488,7 +488,7 @@ static void addHoleToPolygon( std::vector<wxPoint>& aBuffer, ...@@ -488,7 +488,7 @@ static void addHoleToPolygon( std::vector<wxPoint>& aBuffer,
void D_CODE::ConvertShapeToPolygon() void D_CODE::ConvertShapeToPolygon()
{ {
wxPoint initialpos; wxPoint initialpos;
wxPoint currpos;; wxPoint currpos;
m_PolyCorners.clear(); m_PolyCorners.clear();
......
...@@ -167,6 +167,7 @@ public: ...@@ -167,6 +167,7 @@ public:
void OnUpdateTraceDrawMode( wxUpdateUIEvent& aEvent ); void OnUpdateTraceDrawMode( wxUpdateUIEvent& aEvent );
void OnUpdateHighContrastDisplayMode( wxUpdateUIEvent& aEvent ); void OnUpdateHighContrastDisplayMode( wxUpdateUIEvent& aEvent );
void OnUpdateShowLayerManager( wxUpdateUIEvent& aEvent ); void OnUpdateShowLayerManager( wxUpdateUIEvent& aEvent );
void OnUpdateShowMicrowaveToolbar( wxUpdateUIEvent& aEvent );
void OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent ); void OnUpdateVerticalToolbar( wxUpdateUIEvent& aEvent );
void OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent ); void OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent );
void OnUpdateZoneDisplayStyle( wxUpdateUIEvent& aEvent ); void OnUpdateZoneDisplayStyle( wxUpdateUIEvent& aEvent );
...@@ -215,7 +216,7 @@ public: ...@@ -215,7 +216,7 @@ public:
virtual void SetGridColor(int aColor); virtual void SetGridColor(int aColor);
// Configurations: // Configurations:
void InstallConfigFrame( const wxPoint& pos ); void InstallConfigFrame( );
void Process_Config( wxCommandEvent& event ); void Process_Config( wxCommandEvent& event );
PARAM_CFG_ARRAY& GetProjectFileParameters(); PARAM_CFG_ARRAY& GetProjectFileParameters();
......
...@@ -808,7 +808,7 @@ void CreateThermalReliefPadPolygon( std::vector<CPolyPt>& aCornerBuffer, ...@@ -808,7 +808,7 @@ void CreateThermalReliefPadPolygon( std::vector<CPolyPt>& aCornerBuffer,
aCornerBuffer.push_back( CPolyPt( cpos.x, cpos.y ) ); 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 angle += 1800; // this is calculate hole 3
if( angle >= 3600 ) if( angle >= 3600 )
angle -= 3600; angle -= 3600;
......
...@@ -12,21 +12,21 @@ ...@@ -12,21 +12,21 @@
#include <wx/listimpl.cpp> #include <wx/listimpl.cpp>
/* creates a BOM list rom board /* creates a BOM list rom board
The format is: * The format is:
"Id";"Designator";"Package";"Number";"Designation";"Supplier and ref"; * "Id";"Designator";"Package";"Number";"Designation";"Supplier and ref";
1;"P1";"DB25FC";1;"DB25FEMELLE";;; * 1;"P1";"DB25FC";1;"DB25FEMELLE";;;
2;"U9";"PGA120";1;"4003APG120";;; * 2;"U9";"PGA120";1;"4003APG120";;;
3;"JP1";"pin_array_8x2";1;"CONN_8X2";;; * 3;"JP1";"pin_array_8x2";1;"CONN_8X2";;;
4;"RR1";"r_pack9";1;"9x1K";;; * 4;"RR1";"r_pack9";1;"9x1K";;;
5;"X1";"HC-18UH";1;"8MHz";;; * 5;"X1";"HC-18UH";1;"8MHz";;;
6;"U8";"24dip300";1;"EP600";;; * 6;"U8";"24dip300";1;"EP600";;;
7;"U5";"32dip600";1;"628128";;; * 7;"U5";"32dip600";1;"628128";;;
8;"C2,C3";"C1";2;"47pF";;; * 8;"C2,C3";"C1";2;"47pF";;;
9;"U1";"20dip300";1;"74LS245";;; * 9;"U1";"20dip300";1;"74LS245";;;
10;"U3";"20dip300";1;"74LS541";;; * 10;"U3";"20dip300";1;"74LS541";;;
11;"U2";"20dip300";1;"74LS688";;; * 11;"U2";"20dip300";1;"74LS688";;;
12;"C1,C4,C5,C6";"CP6";4;"47uF";;; * 12;"C1,C4,C5,C6";"CP6";4;"47uF";;;
*/ */
const wxString CsvFileExtension( wxT( "csv" ) ); // BOM file extension const wxString CsvFileExtension( wxT( "csv" ) ); // BOM file extension
...@@ -83,13 +83,13 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent ) ...@@ -83,13 +83,13 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent )
} }
// Write header: // Write header:
msg = wxT( "\""); msg = wxT( "\"" );
msg << _("Id") << wxT("\";\""); msg << _( "Id" ) << wxT( "\";\"" );
msg << _("Designator") << wxT("\";\""); msg << _( "Designator" ) << wxT( "\";\"" );
msg << _("Package") << wxT("\";\""); msg << _( "Package" ) << wxT( "\";\"" );
msg << _("Quantity") << wxT("\";\""); msg << _( "Quantity" ) << wxT( "\";\"" );
msg << _("Designation") << wxT("\";\""); msg << _( "Designation" ) << wxT( "\";\"" );
msg << _("Supplier and ref") << wxT("\";\n" ); msg << _( "Supplier and ref" ) << wxT( "\";\n" );
fprintf( FichBom, "%s", TO_UTF8( msg ) ); fprintf( FichBom, "%s", TO_UTF8( msg ) );
// Build list // Build list
...@@ -97,7 +97,7 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent ) ...@@ -97,7 +97,7 @@ void PCB_EDIT_FRAME::RecreateBOMFileFromBoard( wxCommandEvent& aEvent )
cmp* comp = NULL; cmp* comp = NULL;
CmpList::iterator iter; CmpList::iterator iter;
int i = 1; int i = 1;
while (Module != NULL) while( Module != NULL )
{ {
bool valExist = false; bool valExist = false;
......
...@@ -75,7 +75,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const ...@@ -75,7 +75,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
break; break;
case TYPE_TEXTE: case TYPE_TEXTE:
text << _( "Pcb Text" ) << wxT( " " );; text << _( "Pcb Text" ) << wxT( " " );
if( ( (TEXTE_PCB*) item )->m_Text.Len() < 12 ) if( ( (TEXTE_PCB*) item )->m_Text.Len() < 12 )
text << ( (TEXTE_PCB*) item )->m_Text; text << ( (TEXTE_PCB*) item )->m_Text;
else else
......
...@@ -755,7 +755,7 @@ void MODULE::SetRectangleExinscrit() ...@@ -755,7 +755,7 @@ void MODULE::SetRectangleExinscrit()
*/ */
EDA_Rect MODULE::GetBoundingBox() const EDA_Rect MODULE::GetBoundingBox() const
{ {
EDA_Rect area = GetFootPrintRect();; EDA_Rect area = GetFootPrintRect();
// Calculate extended area including text field: // Calculate extended area including text field:
EDA_Rect text_area; EDA_Rect text_area;
......
...@@ -20,32 +20,33 @@ ...@@ -20,32 +20,33 @@
void PCB_EDIT_FRAME::InstallDisplayOptionsDialog( wxCommandEvent& aEvent ) void PCB_EDIT_FRAME::InstallDisplayOptionsDialog( wxCommandEvent& aEvent )
{ {
Dialog_Display_Options* DisplayOptionsDialog = DIALOG_DISPLAY_OPTIONS dlg( this );
new Dialog_Display_Options( this ); dlg.ShowModal();
DisplayOptionsDialog->ShowModal();
DisplayOptionsDialog->Destroy();
} }
/*******************************************************************************/ /*******************************************************************************/
Dialog_Display_Options::Dialog_Display_Options( PCB_EDIT_FRAME* parent ) : DIALOG_DISPLAY_OPTIONS::DIALOG_DISPLAY_OPTIONS( PCB_EDIT_FRAME* parent ) :
DialogDisplayOptions_base(parent) DIALOG_DISPLAY_OPTIONS_BASE(parent)
/*******************************************************************************/ /*******************************************************************************/
{ {
m_Parent = parent; m_Parent = parent;
init(); init();
GetSizer()->SetSizeHints( this );
} }
/****************************************************************/ /****************************************************************/
void Dialog_Display_Options::init() void DIALOG_DISPLAY_OPTIONS::init()
/****************************************************************/ /****************************************************************/
{ {
SetFocus(); SetFocus();
if ( DisplayOpt.DisplayPcbTrackFill ) if ( DisplayOpt.DisplayPcbTrackFill )
m_OptDisplayTracks->SetSelection(1); m_OptDisplayTracks->SetSelection(1);
else
m_OptDisplayTracks->SetSelection(0);
switch ( DisplayOpt.ShowTrackClearanceMode ) switch ( DisplayOpt.ShowTrackClearanceMode )
{ {
...@@ -84,31 +85,26 @@ void Dialog_Display_Options::init() ...@@ -84,31 +85,26 @@ void Dialog_Display_Options::init()
m_OptDisplayPadNoConn->SetValue( m_Parent->IsElementVisible( PCB_VISIBLE(NO_CONNECTS_VISIBLE) ) ); m_OptDisplayPadNoConn->SetValue( m_Parent->IsElementVisible( PCB_VISIBLE(NO_CONNECTS_VISIBLE) ) );
m_OptDisplayDrawings->SetSelection( DisplayOpt.DisplayDrawItems ); m_OptDisplayDrawings->SetSelection( DisplayOpt.DisplayDrawItems );
m_ShowNetNamesOption->SetSelection( DisplayOpt.DisplayNetNamesMode); 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 /* 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; else g_ShowPageLimits = FALSE;
if ( m_OptDisplayTracks->GetSelection() == 1) if ( m_OptDisplayTracks->GetSelection() == 1)
DisplayOpt.DisplayPcbTrackFill = TRUE; DisplayOpt.DisplayPcbTrackFill = true;
else DisplayOpt.DisplayPcbTrackFill = FALSE; else DisplayOpt.DisplayPcbTrackFill = FALSE;
m_Parent->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; m_Parent->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill;
...@@ -158,7 +154,7 @@ void Dialog_Display_Options::OnOkClick(wxCommandEvent& event) ...@@ -158,7 +154,7 @@ void Dialog_Display_Options::OnOkClick(wxCommandEvent& event)
DisplayOpt.DisplayDrawItems = m_OptDisplayDrawings->GetSelection(); DisplayOpt.DisplayDrawItems = m_OptDisplayDrawings->GetSelection();
DisplayOpt.DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection(); DisplayOpt.DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection();
m_Parent->DrawPanel->Refresh(TRUE); m_Parent->DrawPanel->Refresh();
EndModal(1); EndModal(1);
} }
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
#include "dialog_display_options_base.h" #include "dialog_display_options_base.h"
class Dialog_Display_Options : public DialogDisplayOptions_base class DIALOG_DISPLAY_OPTIONS : public DIALOG_DISPLAY_OPTIONS_BASE
{ {
private: private:
PCB_EDIT_FRAME* m_Parent; PCB_EDIT_FRAME* m_Parent;
...@@ -11,8 +11,8 @@ private: ...@@ -11,8 +11,8 @@ private:
void init(); void init();
public: public:
Dialog_Display_Options( PCB_EDIT_FRAME* parent ); DIALOG_DISPLAY_OPTIONS( PCB_EDIT_FRAME* parent );
~Dialog_Display_Options( ) { }; ~DIALOG_DISPLAY_OPTIONS( ) { };
void OnOkClick( wxCommandEvent& event ); void OnOkClick( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event );
}; };
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Nov 17 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) DIALOG_DISPLAY_OPTIONS_BASE::DIALOG_DISPLAY_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
{ {
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); this->SetSizeHints( wxDefaultSize, wxDefaultSize );
...@@ -27,13 +27,11 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow ...@@ -27,13 +27,11 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow
sLeftBoxSizer->Add( m_OptDisplayTracks, 0, wxALL|wxEXPAND, 5 ); sLeftBoxSizer->Add( m_OptDisplayTracks, 0, wxALL|wxEXPAND, 5 );
wxString m_OptDisplayTracksClearanceChoices[] = { _("Never"), _("New track"), _("New track with via area"), _("Always") }; wxString m_OptDisplayViasChoices[] = { _("Sketch"), _("Filled") };
int m_OptDisplayTracksClearanceNChoices = sizeof( m_OptDisplayTracksClearanceChoices ) / sizeof( wxString ); int m_OptDisplayViasNChoices = sizeof( m_OptDisplayViasChoices ) / sizeof( wxString );
m_OptDisplayTracksClearance = new wxRadioBox( this, ID_SHOW_CLEARANCE, _("Show Tracks Clearance:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksClearanceNChoices, m_OptDisplayTracksClearanceChoices, 1, wxRA_SPECIFY_COLS ); m_OptDisplayVias = new wxRadioBox( this, ID_VIAS_SHAPES, _("Via Shapes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayViasNChoices, m_OptDisplayViasChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayTracksClearance->SetSelection( 0 ); m_OptDisplayVias->SetSelection( 1 );
m_OptDisplayTracksClearance->SetToolTip( _("Show( or not) tracks clearance area.\nIf New track is selected, track clearance area is shown only when creating the track.") ); sLeftBoxSizer->Add( m_OptDisplayVias, 0, wxALL|wxEXPAND, 5 );
sLeftBoxSizer->Add( m_OptDisplayTracksClearance, 0, wxALL|wxEXPAND, 5 );
wxString m_OptDisplayViaHoleChoices[] = { _("Never"), _("Defined holes"), _("Always") }; wxString m_OptDisplayViaHoleChoices[] = { _("Never"), _("Defined holes"), _("Always") };
int m_OptDisplayViaHoleNChoices = sizeof( m_OptDisplayViaHoleChoices ) / sizeof( wxString ); int m_OptDisplayViaHoleNChoices = sizeof( m_OptDisplayViaHoleChoices ) / sizeof( wxString );
...@@ -46,7 +44,7 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow ...@@ -46,7 +44,7 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow
bMainSizer->Add( sLeftBoxSizer, 0, wxEXPAND|wxALL, 5 ); bMainSizer->Add( sLeftBoxSizer, 0, wxEXPAND|wxALL, 5 );
wxStaticBoxSizer* sbMiddleLeftSizer; wxStaticBoxSizer* sbMiddleLeftSizer;
sbMiddleLeftSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Names:") ), wxVERTICAL ); sbMiddleLeftSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Routing help:") ), wxVERTICAL );
wxString m_ShowNetNamesOptionChoices[] = { _("Do not show"), _("On pads"), _("On tracks"), _("On pads and tracks") }; wxString m_ShowNetNamesOptionChoices[] = { _("Do not show"), _("On pads"), _("On tracks"), _("On pads and tracks") };
int m_ShowNetNamesOptionNChoices = sizeof( m_ShowNetNamesOptionChoices ) / sizeof( wxString ); int m_ShowNetNamesOptionNChoices = sizeof( m_ShowNetNamesOptionChoices ) / sizeof( wxString );
...@@ -56,6 +54,14 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow ...@@ -56,6 +54,14 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow
sbMiddleLeftSizer->Add( m_ShowNetNamesOption, 0, wxALL, 5 ); sbMiddleLeftSizer->Add( m_ShowNetNamesOption, 0, wxALL, 5 );
wxString m_OptDisplayTracksClearanceChoices[] = { _("Never"), _("New track"), _("New track with via area"), _("Always") };
int m_OptDisplayTracksClearanceNChoices = sizeof( m_OptDisplayTracksClearanceChoices ) / sizeof( wxString );
m_OptDisplayTracksClearance = new wxRadioBox( this, ID_SHOW_CLEARANCE, _("Show Tracks Clearance:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksClearanceNChoices, m_OptDisplayTracksClearanceChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayTracksClearance->SetSelection( 0 );
m_OptDisplayTracksClearance->SetToolTip( _("Show( or not) tracks clearance area.\nIf New track is selected, track clearance area is shown only when creating the track.") );
sbMiddleLeftSizer->Add( m_OptDisplayTracksClearance, 0, wxALL|wxEXPAND, 5 );
bMainSizer->Add( sbMiddleLeftSizer, 0, wxALL|wxEXPAND, 5 ); bMainSizer->Add( sbMiddleLeftSizer, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* sMiddleRightSizer; wxStaticBoxSizer* sMiddleRightSizer;
...@@ -87,24 +93,15 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow ...@@ -87,24 +93,15 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow
m_OptDisplayPads->SetSelection( 1 ); m_OptDisplayPads->SetSelection( 1 );
bRModuleSizer->Add( m_OptDisplayPads, 0, wxALL|wxEXPAND, 5 ); bRModuleSizer->Add( m_OptDisplayPads, 0, wxALL|wxEXPAND, 5 );
wxString m_OptDisplayViasChoices[] = { _("Sketch"), _("Filled") };
int m_OptDisplayViasNChoices = sizeof( m_OptDisplayViasChoices ) / sizeof( wxString );
m_OptDisplayVias = new wxRadioBox( this, ID_VIAS_SHAPES, _("Via Shapes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayViasNChoices, m_OptDisplayViasChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayVias->SetSelection( 1 );
bRModuleSizer->Add( m_OptDisplayVias, 0, wxALL|wxEXPAND, 5 );
m_OptDisplayPadClearence = new wxCheckBox( this, wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 ); m_OptDisplayPadClearence = new wxCheckBox( this, wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 );
bRModuleSizer->Add( m_OptDisplayPadClearence, 0, wxALL, 5 ); bRModuleSizer->Add( m_OptDisplayPadClearence, 0, wxALL, 5 );
m_OptDisplayPadNumber = new wxCheckBox( this, wxID_ANY, _("Show pad number"), wxDefaultPosition, wxDefaultSize, 0 ); m_OptDisplayPadNumber = new wxCheckBox( this, wxID_ANY, _("Show pad number"), wxDefaultPosition, wxDefaultSize, 0 );
m_OptDisplayPadNumber->SetValue(true); m_OptDisplayPadNumber->SetValue(true);
bRModuleSizer->Add( m_OptDisplayPadNumber, 0, wxALL, 5 ); bRModuleSizer->Add( m_OptDisplayPadNumber, 0, wxALL, 5 );
m_OptDisplayPadNoConn = new wxCheckBox( this, wxID_ANY, _("Show pad NoConnect"), wxDefaultPosition, wxDefaultSize, 0 ); m_OptDisplayPadNoConn = new wxCheckBox( this, wxID_ANY, _("Show pad NoConnect"), wxDefaultPosition, wxDefaultSize, 0 );
m_OptDisplayPadNoConn->SetValue(true); m_OptDisplayPadNoConn->SetValue(true);
bRModuleSizer->Add( m_OptDisplayPadNoConn, 0, wxALL, 5 ); bRModuleSizer->Add( m_OptDisplayPadNoConn, 0, wxALL, 5 );
sMiddleRightSizer->Add( bRModuleSizer, 0, 0, 5 ); sMiddleRightSizer->Add( bRModuleSizer, 0, 0, 5 );
...@@ -146,13 +143,14 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow ...@@ -146,13 +143,14 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow
this->Layout(); this->Layout();
// Connect Events // Connect Events
m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogDisplayOptions_base::OnOkClick ), NULL, this ); m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this );
m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogDisplayOptions_base::OnCancelClick ), NULL, this ); m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this );
} }
DialogDisplayOptions_base::~DialogDisplayOptions_base() DIALOG_DISPLAY_OPTIONS_BASE::~DIALOG_DISPLAY_OPTIONS_BASE()
{ {
// Disconnect Events // Disconnect Events
m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogDisplayOptions_base::OnOkClick ), NULL, this ); m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this );
m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogDisplayOptions_base::OnCancelClick ), NULL, this ); m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this );
} }
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) // C++ code generated with wxFormBuilder (version Nov 17 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class DialogDisplayOptions_base /// Class DIALOG_DISPLAY_OPTIONS_BASE
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DialogDisplayOptions_base : public wxDialog class DIALOG_DISPLAY_OPTIONS_BASE : public wxDialog
{ {
private: private:
...@@ -35,22 +35,22 @@ class DialogDisplayOptions_base : public wxDialog ...@@ -35,22 +35,22 @@ class DialogDisplayOptions_base : public wxDialog
enum enum
{ {
wxID_DISPLAY_TRACK = 1000, wxID_DISPLAY_TRACK = 1000,
ID_SHOW_CLEARANCE, ID_VIAS_SHAPES,
ID_VIAS_HOLES, ID_VIAS_HOLES,
ID_SHOW_CLEARANCE,
ID_EDGES_MODULES, ID_EDGES_MODULES,
ID_TEXT_MODULES, ID_TEXT_MODULES,
ID_PADS_SHAPES, ID_PADS_SHAPES,
ID_VIAS_SHAPES,
}; };
wxRadioBox* m_OptDisplayTracks; wxRadioBox* m_OptDisplayTracks;
wxRadioBox* m_OptDisplayTracksClearance; wxRadioBox* m_OptDisplayVias;
wxRadioBox* m_OptDisplayViaHole; wxRadioBox* m_OptDisplayViaHole;
wxRadioBox* m_ShowNetNamesOption; wxRadioBox* m_ShowNetNamesOption;
wxRadioBox* m_OptDisplayTracksClearance;
wxRadioBox* m_OptDisplayModEdges; wxRadioBox* m_OptDisplayModEdges;
wxRadioBox* m_OptDisplayModTexts; wxRadioBox* m_OptDisplayModTexts;
wxRadioBox* m_OptDisplayPads; wxRadioBox* m_OptDisplayPads;
wxRadioBox* m_OptDisplayVias;
wxCheckBox* m_OptDisplayPadClearence; wxCheckBox* m_OptDisplayPadClearence;
wxCheckBox* m_OptDisplayPadNumber; wxCheckBox* m_OptDisplayPadNumber;
wxCheckBox* m_OptDisplayPadNoConn; wxCheckBox* m_OptDisplayPadNoConn;
...@@ -61,13 +61,14 @@ class DialogDisplayOptions_base : public wxDialog ...@@ -61,13 +61,14 @@ class DialogDisplayOptions_base : public wxDialog
wxButton* m_buttonCANCEL; wxButton* m_buttonCANCEL;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
public: 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(); 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();
}; };
......
...@@ -172,12 +172,9 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) ...@@ -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.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools );
m_auimgr.Update(); m_auimgr.Update();
if( m_show_layer_manager_tools )
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG, GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
_("Hide &Layers Manager" ) ); m_show_layer_manager_tools ?
else _("Hide &Layers Manager" ) : _("Show &Layers Manager" ) );
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
_("Show &Layers Manager" ) );
break; break;
default: default:
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
/*****************************************************************/ /*****************************************************************/
void PCB_EDIT_FRAME::InstallConfigFrame( const wxPoint& pos ) void PCB_EDIT_FRAME::InstallConfigFrame( )
/*****************************************************************/ /*****************************************************************/
{ {
DIALOG_PCBNEW_CONFIG_LIBS dialog( this ); DIALOG_PCBNEW_CONFIG_LIBS dialog( this );
......
...@@ -105,7 +105,7 @@ DIMENSION_EDITOR_DIALOG::DIMENSION_EDITOR_DIALOG( PCB_EDIT_FRAME* parent, ...@@ -105,7 +105,7 @@ DIMENSION_EDITOR_DIALOG::DIMENSION_EDITOR_DIALOG( PCB_EDIT_FRAME* parent,
wxDefaultPosition, wxSize( -1, -1 ), 2, display_msg, wxDefaultPosition, wxSize( -1, -1 ), 2, display_msg,
1, wxRA_SPECIFY_COLS ); 1, wxRA_SPECIFY_COLS );
if( Dimension->m_Text->m_Mirror ) if( Dimension->m_Text->m_Mirror )
m_Mirror->SetSelection( 1 );; m_Mirror->SetSelection( 1 );
RightBoxSizer->Add( m_Mirror, 0, wxGROW | wxALL, 5 ); RightBoxSizer->Add( m_Mirror, 0, wxGROW | wxALL, 5 );
m_Name = new WinEDA_EnterText( this, wxT( "Text:" ), m_Name = new WinEDA_EnterText( this, wxT( "Text:" ),
......
...@@ -213,7 +213,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -213,7 +213,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
break; break;
case ID_DRC_CONTROL: case ID_DRC_CONTROL:
m_drc->ShowDialog();; m_drc->ShowDialog();
break; break;
case ID_GET_NETLIST: case ID_GET_NETLIST:
...@@ -513,7 +513,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ...@@ -513,7 +513,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
{ {
// Remove filled areas in zone // Remove filled areas in zone
ZONE_CONTAINER* zone_container = GetBoard()->GetArea( ii ); 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 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, ...@@ -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( (pt_segm->Type() == TYPE_TRACK ) && aTrack )
{ {
if( SetTrackSegmentWidth( pt_segm, &itemsListPicker, true ) ) if( SetTrackSegmentWidth( pt_segm, &itemsListPicker, true ) )
change = true;; change = true;
} }
} }
......
...@@ -494,7 +494,7 @@ void CreateSignalsSection( FILE* file, BOARD* pcb ) ...@@ -494,7 +494,7 @@ void CreateSignalsSection( FILE* file, BOARD* pcb )
// connection) // connection)
{ {
wxString msg; msg << wxT( "NoConnection" ) << NbNoConn++; wxString msg; msg << wxT( "NoConnection" ) << NbNoConn++;
net->SetNetname( msg );; net->SetNetname( msg );
} }
if( net->GetNet() <= 0 ) // dummy netlist (no connection) if( net->GetNet() <= 0 ) // dummy netlist (no connection)
......
...@@ -225,7 +225,7 @@ bool MODULE::Read_GPCB_Descr( const wxString& CmpFullFileName ) ...@@ -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.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; m_Reference->m_Orient = ibuf[4] * 900;
// Calculate size: default is 40 mils (400 pcb units) // Calculate size: default is 40 mils (400 pcb units)
......
...@@ -97,7 +97,7 @@ void Place_1_Pad_Board( BOARD* Pcb, ...@@ -97,7 +97,7 @@ void Place_1_Pad_Board( BOARD* Pcb,
int op_logique ) int op_logique )
{ {
int dx, dy; int dx, dy;
wxPoint shape_pos = pt_pad->ReturnShapePos();; wxPoint shape_pos = pt_pad->ReturnShapePos();
dx = pt_pad->m_Size.x / 2; dx += marge; dx = pt_pad->m_Size.x / 2; dx += marge;
......
...@@ -232,7 +232,7 @@ int PCB_BASE_FRAME::ReadGeneralDescrPcb( LINE_READER* aReader ) ...@@ -232,7 +232,7 @@ int PCB_BASE_FRAME::ReadGeneralDescrPcb( LINE_READER* aReader )
if( stricmp( data, "BoardThickness" ) == 0 ) if( stricmp( data, "BoardThickness" ) == 0 )
{ {
data = strtok( NULL, " =\n\r" ); data = strtok( NULL, " =\n\r" );
GetBoard()->GetBoardDesignSettings()->m_BoardThickness = atoi( data );; GetBoard()->GetBoardDesignSettings()->m_BoardThickness = atoi( data );
continue; continue;
} }
...@@ -269,7 +269,7 @@ int PCB_BASE_FRAME::ReadGeneralDescrPcb( LINE_READER* aReader ) ...@@ -269,7 +269,7 @@ int PCB_BASE_FRAME::ReadGeneralDescrPcb( LINE_READER* aReader )
if( stricmp( data, "Ndraw" ) == 0 ) if( stricmp( data, "Ndraw" ) == 0 )
{ {
data = strtok( NULL, " =\n\r" ); data = strtok( NULL, " =\n\r" );
NbDraw = atoi( data );; NbDraw = atoi( data );
continue; continue;
} }
......
...@@ -476,7 +476,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() ...@@ -476,7 +476,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
// Colors and Visibility are also handled by the layers manager toolbar // Colors and Visibility are also handled by the layers manager toolbar
item = new wxMenuItem( configmenu, ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG, 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 ); HELP_SHOW_HIDE_LAYERMANAGER );
item->SetBitmap( layers_manager_xpm ); item->SetBitmap( layers_manager_xpm );
configmenu->Append( item ); configmenu->Append( item );
......
...@@ -128,7 +128,7 @@ void WinEDA_ModuleEditFrame::GetComponentFromUndoList( wxCommandEvent& event ) ...@@ -128,7 +128,7 @@ void WinEDA_ModuleEditFrame::GetComponentFromUndoList( wxCommandEvent& event )
GetBoard()->Add( module, ADD_APPEND ); GetBoard()->Add( module, ADD_APPEND );
SetCurItem( NULL );; SetCurItem( NULL );
OnModify(); OnModify();
DrawPanel->Refresh(); DrawPanel->Refresh();
......
...@@ -218,8 +218,10 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) ...@@ -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_TRACKS_SKETCH, PCB_EDIT_FRAME::OnUpdateTraceDrawMode )
EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE, EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
PCB_EDIT_FRAME::OnUpdateHighContrastDisplayMode ) 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 ) 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_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_TRACK_WIDTH, PCB_EDIT_FRAME::OnUpdateSelectTrackWidth )
EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH, 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, ...@@ -344,29 +346,30 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title,
lyrs.IsFloatable(); lyrs.IsFloatable();
if( m_HToolBar ) if( m_HToolBar ) // The main horizontal toolbar
{ {
m_auimgr.AddPane( m_HToolBar, m_auimgr.AddPane( m_HToolBar,
wxAuiPaneInfo( horiz_tb ).Name( wxT( "m_HToolBar" ) ).Top().Row( 0 ) ); 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, m_auimgr.AddPane( m_AuxiliaryToolBar,
wxAuiPaneInfo( horiz_tb ).Name( wxT( "m_AuxiliaryToolBar" ) ).Top().Row( 1 ) ); 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, m_auimgr.AddPane( m_AuxVToolBar,
wxAuiPaneInfo( vert ).Name( wxT( "m_AuxVToolBar" ) ).Right().Row( 2 ).Hide() ); 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, m_auimgr.AddPane( m_VToolBar,
wxAuiPaneInfo( vert ).Name( wxT( "m_VToolBar" ) ).Right().Row( 1 ) ); 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 ) ); 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, m_auimgr.AddPane( m_OptionsToolBar,
wxAuiPaneInfo( vert ).Name( wxT( "m_OptionsToolBar" ) ).Left() wxAuiPaneInfo( vert ).Name( wxT( "m_OptionsToolBar" ) ).Left()
......
...@@ -30,28 +30,18 @@ ...@@ -30,28 +30,18 @@
void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
{ {
int id = event.GetId(); int id = event.GetId();
wxPoint pos;
wxFileName fn; wxFileName fn;
pos = GetPosition();
pos.x += 20;
pos.y += 20;
switch( id ) switch( id )
{ {
case ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG: case ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG:
if( m_OptionsToolBar ) m_show_layer_manager_tools = ! m_show_layer_manager_tools;
{ //This command is same as the Options Vertical Toolbar m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools );
// tool Show/hide layers manager m_auimgr.Update();
bool state =
m_OptionsToolBar->GetToolState( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR ); GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR, m_show_layer_manager_tools ?
!state ); _("Hide &Layers Manager" ) : _("Show &Layers Manager" ));
wxCommandEvent event( wxEVT_COMMAND_TOOL_CLICKED,
ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR );
wxPostEvent( this, event );
}
break; break;
case ID_PCB_LAYERS_SETUP: case ID_PCB_LAYERS_SETUP:
...@@ -59,7 +49,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) ...@@ -59,7 +49,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
break; break;
case ID_CONFIG_REQ: case ID_CONFIG_REQ:
InstallConfigFrame( pos ); InstallConfigFrame();
break; break;
case ID_PCB_MASK_CLEARANCE: case ID_PCB_MASK_CLEARANCE:
...@@ -127,7 +117,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event ) ...@@ -127,7 +117,7 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
break; break;
default: 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 ) ...@@ -152,7 +142,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName )
/* Initialize default values. */ /* Initialize default values. */
g_LibName_List.Clear(); 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. */ /* User library path takes precedent over default library search paths. */
wxGetApp().InsertLibraryPath( g_UserLibDirBuffer, 1 ); wxGetApp().InsertLibraryPath( g_UserLibDirBuffer, 1 );
...@@ -167,7 +157,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName ) ...@@ -167,7 +157,7 @@ bool PCB_EDIT_FRAME::LoadProjectSettings( const wxString& aProjectFileName )
SetVisibleAlls(); SetVisibleAlls();
SetElementVisibility( GRID_VISIBLE, showGrid ); SetElementVisibility( GRID_VISIBLE, showGrid );
SetElementVisibility( RATSNEST_VISIBLE, showRats ); SetElementVisibility( RATSNEST_VISIBLE, showRats );
return TRUE; return true;
} }
...@@ -215,8 +205,6 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetProjectFileParameters() ...@@ -215,8 +205,6 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetProjectFileParameters()
m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "BoardThickness" ), m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "BoardThickness" ),
&boardDesignSettings.m_BoardThickness, &boardDesignSettings.m_BoardThickness,
630, 0, 0xFFFF ) ); 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" ), m_projectFileParams.push_back( new PARAM_CFG_INT( wxT( "TxtPcbV" ),
&boardDesignSettings.m_PcbTextSize.y, &boardDesignSettings.m_PcbTextSize.y,
600, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE ) ); 600, TEXTS_MIN_SIZE, TEXTS_MAX_SIZE ) );
...@@ -271,32 +259,39 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings() ...@@ -271,32 +259,39 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings()
if( !m_configSettings.empty() ) if( !m_configSettings.empty() )
return m_configSettings; 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, &DisplayOpt.m_DisplayViaMode,
VIA_SPECIAL_HOLE_SHOW, VIA_HOLE_NOT_SHOW, VIA_SPECIAL_HOLE_SHOW, VIA_HOLE_NOT_SHOW,
OPT_VIA_HOLE_END - 1 ) ); OPT_VIA_HOLE_END - 1 ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ShowNetNamesMode" ), m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ShowNetNamesMode" ),
&DisplayOpt.DisplayNetNamesMode, 3, 0, 3 ) ); &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( "DisplayTrackFilled" ),
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "SegFill" ), &DisplayOpt.DisplayPcbTrackFill, true ) );
&DisplayOpt.DisplayPcbTrackFill, TRUE ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "TrackDisplayClearance" ), m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "TrackDisplayClearance" ),
&DisplayOpt.ShowTrackClearanceMode, &DisplayOpt.ShowTrackClearanceMode,
SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS ) ); SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PadFill" ), 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" ), 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" ), 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" ), 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" ), m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ModAffC" ),
&DisplayOpt.DisplayModEdge, FILLED, 0, 2 ) ); &DisplayOpt.DisplayModEdge, FILLED, 0, 2 ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ModAffT" ), m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "ModAffT" ),
&DisplayOpt.DisplayModText, FILLED, 0, 2 ) ); &DisplayOpt.DisplayModText, FILLED, 0, 2 ) );
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "PcbAffT" ), m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "PcbAffT" ),
&DisplayOpt.DisplayDrawItems, FILLED, 0, 2 ) ); &DisplayOpt.DisplayDrawItems, FILLED, 0, 2 ) );
// Colors:
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay0" ), LOC_COLOR( 0 ), m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay0" ), LOC_COLOR( 0 ),
GREEN ) ); GREEN ) );
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColLay1" ), LOC_COLOR( 1 ), 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() ...@@ -388,15 +383,17 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings()
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CoRatsN" ), m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "CoRatsN" ),
ITEM_COLOR( RATSNEST_VISIBLE ), ITEM_COLOR( RATSNEST_VISIBLE ),
WHITE ) ); WHITE ) );
// Miscellaneous:
m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "TimeOut" ), &g_TimeOut, m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "TimeOut" ), &g_TimeOut,
600, 0, 60000 ) ); 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, m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "MaxLnkS" ), &g_MaxLinksShowed,
3, 0, 15 ) ); 3, 0, 15 ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "ShowMRa" ), 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" ), 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; return m_configSettings;
} }
...@@ -156,6 +156,11 @@ void PCB_EDIT_FRAME::OnUpdateHighContrastDisplayMode( wxUpdateUIEvent& aEvent ) ...@@ -156,6 +156,11 @@ void PCB_EDIT_FRAME::OnUpdateHighContrastDisplayMode( wxUpdateUIEvent& aEvent )
void PCB_EDIT_FRAME::OnUpdateShowLayerManager( 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() ); aEvent.Check( m_auimgr.GetPane( wxT( "m_AuxVToolBar" ) ).IsShown() );
} }
......
...@@ -143,12 +143,18 @@ int PCB_EDIT_FRAME::Fill_All_Zones( bool verbose ) ...@@ -143,12 +143,18 @@ int PCB_EDIT_FRAME::Fill_All_Zones( bool verbose )
int errorLevel = 0; int errorLevel = 0;
int areaCount = GetBoard()->GetAreaCount(); int areaCount = GetBoard()->GetAreaCount();
wxBusyCursor dummyCursor; wxBusyCursor dummyCursor;
wxString msg;
#define FORMAT_STRING _( "Filling zone %d out of %d (net %s)..." )
wxProgressDialog progressDialog( wxT( "Fill All Zones" ), // Create a message with a long net name, and build a wxProgressDialog
wxT( "Starting zone fill..." ), // 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, areaCount+2, this,
wxPD_AUTO_HIDE | wxPD_APP_MODAL | wxPD_CAN_ABORT ); 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 // Remove segment zones
GetBoard()->m_Zone.DeleteAll(); GetBoard()->m_Zone.DeleteAll();
...@@ -157,11 +163,10 @@ int PCB_EDIT_FRAME::Fill_All_Zones( bool verbose ) ...@@ -157,11 +163,10 @@ int PCB_EDIT_FRAME::Fill_All_Zones( bool verbose )
for( ii = 0; ii < areaCount; ii++ ) for( ii = 0; ii < areaCount; ii++ )
{ {
ZONE_CONTAINER* zoneContainer = GetBoard()->GetArea( ii ); ZONE_CONTAINER* zoneContainer = GetBoard()->GetArea( ii );
wxString str; msg.Printf( FORMAT_STRING,
str.Printf( wxT( "Filling zone %d out of %d (net %s)..." ),
ii+1, areaCount, GetChars( zoneContainer->GetNetName() ) ); ii+1, areaCount, GetChars( zoneContainer->GetNetName() ) );
if( !progressDialog.Update( ii+1, str ) ) if( !progressDialog.Update( ii+1, msg ) )
break; break;
errorLevel = Fill_Zone( zoneContainer, verbose ); errorLevel = Fill_Zone( zoneContainer, verbose );
...@@ -169,7 +174,7 @@ int PCB_EDIT_FRAME::Fill_All_Zones( bool verbose ) ...@@ -169,7 +174,7 @@ int PCB_EDIT_FRAME::Fill_All_Zones( bool verbose )
if( errorLevel && !verbose ) if( errorLevel && !verbose )
break; break;
} }
progressDialog.Update( ii+2, wxT( "Updating ratsnest..." ) ); progressDialog.Update( ii+2, _( "Updating ratsnest..." ) );
test_connexions( NULL ); test_connexions( NULL );
// Recalculate the active ratsnest, i.e. the unconnected links // 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