diff --git a/include/pcbstruct.h b/include/pcbstruct.h index 5ffbfd10ee..d8f23b4941 100644 --- a/include/pcbstruct.h +++ b/include/pcbstruct.h @@ -33,6 +33,10 @@ enum TRACE_CLEARANCE_DISPLAY_MODE_T { * clearance area at end of current new * segment (guide to place a new via */ + SHOW_CLEARANCE_NEW_AND_EDITED_TRACKS_AND_VIA_AREAS, + /* Show clearance for new, moving and + * dragging tracks and vias + */ SHOW_CLEARANCE_ALWAYS /* Show Always clearance areas * for track and vias */ diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 24a6787056..ff68eb74ac 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -30,9 +30,13 @@ static bool ShowClearance( const TRACK* aTrack ) { // maybe return true for tracks and vias, not for zone segments - return DisplayOpt.ShowTrackClearanceMode == SHOW_CLEARANCE_ALWAYS - && aTrack->GetLayer() <= LAST_COPPER_LAYER - && ( aTrack->Type() == TYPE_TRACK || aTrack->Type() == TYPE_VIA ); + return aTrack->GetLayer() <= LAST_COPPER_LAYER + && ( aTrack->Type() == TYPE_TRACK || aTrack->Type() == TYPE_VIA ) + && ( ( DisplayOpt.ShowTrackClearanceMode == SHOW_CLEARANCE_NEW_AND_EDITED_TRACKS_AND_VIA_AREAS + && ( aTrack->m_Flags & IS_DRAGGED || aTrack->m_Flags & IS_MOVED || aTrack->m_Flags & IS_NEW ) ) + || ( DisplayOpt.ShowTrackClearanceMode == SHOW_CLEARANCE_ALWAYS ) + ); + } diff --git a/pcbnew/dialogs/dialog_display_options.cpp b/pcbnew/dialogs/dialog_display_options.cpp index 6b225200bc..faec7c714f 100644 --- a/pcbnew/dialogs/dialog_display_options.cpp +++ b/pcbnew/dialogs/dialog_display_options.cpp @@ -56,20 +56,24 @@ void DIALOG_DISPLAY_OPTIONS::init() m_OptDisplayTracksClearance->SetSelection( 1 ); break; + case SHOW_CLEARANCE_NEW_AND_EDITED_TRACKS_AND_VIA_AREAS: + m_OptDisplayTracksClearance->SetSelection( 3 ); + break; + default: case SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS: - m_OptDisplayTracksClearance->SetSelection(2); + m_OptDisplayTracksClearance->SetSelection( 2 ); break; case SHOW_CLEARANCE_ALWAYS: - m_OptDisplayTracksClearance->SetSelection(3); + m_OptDisplayTracksClearance->SetSelection( 4 ); break; } if ( DisplayOpt.DisplayPadFill ) - m_OptDisplayPads->SetSelection(1); + m_OptDisplayPads->SetSelection( 1 ); else - m_OptDisplayPads->SetSelection(0); + m_OptDisplayPads->SetSelection( 0 ); if ( DisplayOpt.DisplayViaFill ) m_OptDisplayVias->SetSelection( 1 ); @@ -127,6 +131,10 @@ void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event) break; case 3: + DisplayOpt.ShowTrackClearanceMode = SHOW_CLEARANCE_NEW_AND_EDITED_TRACKS_AND_VIA_AREAS; + break; + + case 4: DisplayOpt.ShowTrackClearanceMode = SHOW_CLEARANCE_ALWAYS; break; } diff --git a/pcbnew/dialogs/dialog_display_options_base.cpp b/pcbnew/dialogs/dialog_display_options_base.cpp index d615b180ad..f3221e7413 100644 --- a/pcbnew/dialogs/dialog_display_options_base.cpp +++ b/pcbnew/dialogs/dialog_display_options_base.cpp @@ -1,156 +1,156 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Nov 17 2010) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "dialog_display_options_base.h" - -/////////////////////////////////////////////////////////////////////////// - -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 ); - - wxBoxSizer* bMainSizer; - bMainSizer = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticBoxSizer* sLeftBoxSizer; - sLeftBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Tracks and vias:") ), wxVERTICAL ); - - wxString m_OptDisplayTracksChoices[] = { _("Sketch"), _("Filled") }; - int m_OptDisplayTracksNChoices = sizeof( m_OptDisplayTracksChoices ) / sizeof( wxString ); - m_OptDisplayTracks = new wxRadioBox( this, wxID_DISPLAY_TRACK, _("Tracks:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksNChoices, m_OptDisplayTracksChoices, 1, wxRA_SPECIFY_COLS ); - m_OptDisplayTracks->SetSelection( 1 ); - m_OptDisplayTracks->SetToolTip( _("Select how tracks are displayed") ); - - sLeftBoxSizer->Add( m_OptDisplayTracks, 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 ); - sLeftBoxSizer->Add( m_OptDisplayVias, 0, wxALL|wxEXPAND, 5 ); - - wxString m_OptDisplayViaHoleChoices[] = { _("Never"), _("Defined holes"), _("Always") }; - int m_OptDisplayViaHoleNChoices = sizeof( m_OptDisplayViaHoleChoices ) / sizeof( wxString ); - m_OptDisplayViaHole = new wxRadioBox( this, ID_VIAS_HOLES, _("Show Via Holes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayViaHoleNChoices, m_OptDisplayViaHoleChoices, 1, wxRA_SPECIFY_COLS ); - m_OptDisplayViaHole->SetSelection( 1 ); - m_OptDisplayViaHole->SetToolTip( _("Show (or not) via holes.\nIf Defined Holes is selected, only the non default size holes are shown") ); - - sLeftBoxSizer->Add( m_OptDisplayViaHole, 0, wxALL|wxEXPAND, 5 ); - - bMainSizer->Add( sLeftBoxSizer, 0, wxEXPAND|wxALL, 5 ); - - wxStaticBoxSizer* sbMiddleLeftSizer; - 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") }; - int m_ShowNetNamesOptionNChoices = sizeof( m_ShowNetNamesOptionChoices ) / sizeof( wxString ); - m_ShowNetNamesOption = new wxRadioBox( this, wxID_ANY, _("Show Net Names:"), wxDefaultPosition, wxDefaultSize, m_ShowNetNamesOptionNChoices, m_ShowNetNamesOptionChoices, 1, wxRA_SPECIFY_COLS ); - m_ShowNetNamesOption->SetSelection( 3 ); - m_ShowNetNamesOption->SetToolTip( _("Show or not net names on pads and/or tracks") ); - - 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 ); - - wxStaticBoxSizer* sMiddleRightSizer; - sMiddleRightSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprints:") ), wxHORIZONTAL ); - - wxBoxSizer* bLModuleSizer; - bLModuleSizer = new wxBoxSizer( wxVERTICAL ); - - wxString m_OptDisplayModEdgesChoices[] = { _("Line"), _("Filled"), _("Sketch") }; - int m_OptDisplayModEdgesNChoices = sizeof( m_OptDisplayModEdgesChoices ) / sizeof( wxString ); - m_OptDisplayModEdges = new wxRadioBox( this, ID_EDGES_MODULES, _("Module Edges:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayModEdgesNChoices, m_OptDisplayModEdgesChoices, 1, wxRA_SPECIFY_COLS ); - m_OptDisplayModEdges->SetSelection( 1 ); - bLModuleSizer->Add( m_OptDisplayModEdges, 0, wxALL|wxEXPAND, 5 ); - - wxString m_OptDisplayModTextsChoices[] = { _("Line"), _("Filled"), _("Sketch") }; - int m_OptDisplayModTextsNChoices = sizeof( m_OptDisplayModTextsChoices ) / sizeof( wxString ); - m_OptDisplayModTexts = new wxRadioBox( this, ID_TEXT_MODULES, _("Texts:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayModTextsNChoices, m_OptDisplayModTextsChoices, 1, wxRA_SPECIFY_COLS ); - m_OptDisplayModTexts->SetSelection( 1 ); - bLModuleSizer->Add( m_OptDisplayModTexts, 0, wxALL|wxEXPAND, 5 ); - - sMiddleRightSizer->Add( bLModuleSizer, 0, 0, 5 ); - - wxStaticBoxSizer* bRModuleSizer; - bRModuleSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pad Options:") ), wxVERTICAL ); - - wxString m_OptDisplayPadsChoices[] = { _("Sketch"), _("Filled") }; - int m_OptDisplayPadsNChoices = sizeof( m_OptDisplayPadsChoices ) / sizeof( wxString ); - m_OptDisplayPads = new wxRadioBox( this, ID_PADS_SHAPES, _("Pad Shapes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayPadsNChoices, m_OptDisplayPadsChoices, 1, wxRA_SPECIFY_COLS ); - m_OptDisplayPads->SetSelection( 1 ); - bRModuleSizer->Add( m_OptDisplayPads, 0, wxALL|wxEXPAND, 5 ); - - m_OptDisplayPadClearence = new wxCheckBox( this, wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 ); - bRModuleSizer->Add( m_OptDisplayPadClearence, 0, wxALL, 5 ); - - m_OptDisplayPadNumber = new wxCheckBox( this, wxID_ANY, _("Show pad number"), wxDefaultPosition, wxDefaultSize, 0 ); - m_OptDisplayPadNumber->SetValue(true); - bRModuleSizer->Add( m_OptDisplayPadNumber, 0, wxALL, 5 ); - - m_OptDisplayPadNoConn = new wxCheckBox( this, wxID_ANY, _("Show pad NoConnect"), wxDefaultPosition, wxDefaultSize, 0 ); - m_OptDisplayPadNoConn->SetValue(true); - bRModuleSizer->Add( m_OptDisplayPadNoConn, 0, wxALL, 5 ); - - sMiddleRightSizer->Add( bRModuleSizer, 0, 0, 5 ); - - bMainSizer->Add( sMiddleRightSizer, 0, wxEXPAND|wxALL, 5 ); - - wxBoxSizer* bRightSizer; - bRightSizer = new wxBoxSizer( wxVERTICAL ); - - wxStaticBoxSizer* sRightUpperSizer; - sRightUpperSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Others:") ), wxVERTICAL ); - - wxString m_OptDisplayDrawingsChoices[] = { _("Line"), _("Filled"), _("Sketch") }; - int m_OptDisplayDrawingsNChoices = sizeof( m_OptDisplayDrawingsChoices ) / sizeof( wxString ); - m_OptDisplayDrawings = new wxRadioBox( this, wxID_ANY, _("Display other items:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayDrawingsNChoices, m_OptDisplayDrawingsChoices, 1, wxRA_SPECIFY_COLS ); - m_OptDisplayDrawings->SetSelection( 1 ); - sRightUpperSizer->Add( m_OptDisplayDrawings, 0, wxALL|wxEXPAND, 5 ); - - wxString m_Show_Page_LimitsChoices[] = { _("Yes"), _("No") }; - int m_Show_Page_LimitsNChoices = sizeof( m_Show_Page_LimitsChoices ) / sizeof( wxString ); - m_Show_Page_Limits = new wxRadioBox( this, wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, m_Show_Page_LimitsNChoices, m_Show_Page_LimitsChoices, 1, wxRA_SPECIFY_COLS ); - m_Show_Page_Limits->SetSelection( 0 ); - sRightUpperSizer->Add( m_Show_Page_Limits, 0, wxALL|wxEXPAND, 5 ); - - bRightSizer->Add( sRightUpperSizer, 1, wxEXPAND, 5 ); - - - bRightSizer->Add( 10, 10, 0, 0, 5 ); - - m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); - bRightSizer->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - bRightSizer->Add( m_buttonCANCEL, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); - - bMainSizer->Add( bRightSizer, 0, wxEXPAND|wxALL, 5 ); - - this->SetSizer( bMainSizer ); - this->Layout(); - - // Connect Events - m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this ); - m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this ); -} - -DIALOG_DISPLAY_OPTIONS_BASE::~DIALOG_DISPLAY_OPTIONS_BASE() -{ - // Disconnect Events - m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this ); - m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this ); - -} +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 6 2011) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_display_options_base.h" + +/////////////////////////////////////////////////////////////////////////// + +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 ); + + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxStaticBoxSizer* sLeftBoxSizer; + sLeftBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Tracks and vias:") ), wxVERTICAL ); + + wxString m_OptDisplayTracksChoices[] = { _("Sketch"), _("Filled") }; + int m_OptDisplayTracksNChoices = sizeof( m_OptDisplayTracksChoices ) / sizeof( wxString ); + m_OptDisplayTracks = new wxRadioBox( this, wxID_DISPLAY_TRACK, _("Tracks:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksNChoices, m_OptDisplayTracksChoices, 1, wxRA_SPECIFY_COLS ); + m_OptDisplayTracks->SetSelection( 1 ); + m_OptDisplayTracks->SetToolTip( _("Select how tracks are displayed") ); + + sLeftBoxSizer->Add( m_OptDisplayTracks, 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 ); + sLeftBoxSizer->Add( m_OptDisplayVias, 0, wxALL|wxEXPAND, 5 ); + + wxString m_OptDisplayViaHoleChoices[] = { _("Never"), _("Defined holes"), _("Always") }; + int m_OptDisplayViaHoleNChoices = sizeof( m_OptDisplayViaHoleChoices ) / sizeof( wxString ); + m_OptDisplayViaHole = new wxRadioBox( this, ID_VIAS_HOLES, _("Show Via Holes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayViaHoleNChoices, m_OptDisplayViaHoleChoices, 1, wxRA_SPECIFY_COLS ); + m_OptDisplayViaHole->SetSelection( 1 ); + m_OptDisplayViaHole->SetToolTip( _("Show (or not) via holes.\nIf Defined Holes is selected, only the non default size holes are shown") ); + + sLeftBoxSizer->Add( m_OptDisplayViaHole, 0, wxALL|wxEXPAND, 5 ); + + bMainSizer->Add( sLeftBoxSizer, 0, wxEXPAND|wxALL, 5 ); + + wxStaticBoxSizer* sbMiddleLeftSizer; + 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") }; + int m_ShowNetNamesOptionNChoices = sizeof( m_ShowNetNamesOptionChoices ) / sizeof( wxString ); + m_ShowNetNamesOption = new wxRadioBox( this, wxID_ANY, _("Show Net Names:"), wxDefaultPosition, wxDefaultSize, m_ShowNetNamesOptionNChoices, m_ShowNetNamesOptionChoices, 1, wxRA_SPECIFY_COLS ); + m_ShowNetNamesOption->SetSelection( 3 ); + m_ShowNetNamesOption->SetToolTip( _("Show or not net names on pads and/or tracks") ); + + sbMiddleLeftSizer->Add( m_ShowNetNamesOption, 0, wxALL, 5 ); + + wxString m_OptDisplayTracksClearanceChoices[] = { _("Never"), _("New track"), _("New track with via area"), _("New and edited tracks 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( 3 ); + 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 ); + + wxStaticBoxSizer* sMiddleRightSizer; + sMiddleRightSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprints:") ), wxHORIZONTAL ); + + wxBoxSizer* bLModuleSizer; + bLModuleSizer = new wxBoxSizer( wxVERTICAL ); + + wxString m_OptDisplayModEdgesChoices[] = { _("Line"), _("Filled"), _("Sketch") }; + int m_OptDisplayModEdgesNChoices = sizeof( m_OptDisplayModEdgesChoices ) / sizeof( wxString ); + m_OptDisplayModEdges = new wxRadioBox( this, ID_EDGES_MODULES, _("Module Edges:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayModEdgesNChoices, m_OptDisplayModEdgesChoices, 1, wxRA_SPECIFY_COLS ); + m_OptDisplayModEdges->SetSelection( 1 ); + bLModuleSizer->Add( m_OptDisplayModEdges, 0, wxALL|wxEXPAND, 5 ); + + wxString m_OptDisplayModTextsChoices[] = { _("Line"), _("Filled"), _("Sketch") }; + int m_OptDisplayModTextsNChoices = sizeof( m_OptDisplayModTextsChoices ) / sizeof( wxString ); + m_OptDisplayModTexts = new wxRadioBox( this, ID_TEXT_MODULES, _("Texts:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayModTextsNChoices, m_OptDisplayModTextsChoices, 1, wxRA_SPECIFY_COLS ); + m_OptDisplayModTexts->SetSelection( 1 ); + bLModuleSizer->Add( m_OptDisplayModTexts, 0, wxALL|wxEXPAND, 5 ); + + sMiddleRightSizer->Add( bLModuleSizer, 0, 0, 5 ); + + wxStaticBoxSizer* bRModuleSizer; + bRModuleSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pad Options:") ), wxVERTICAL ); + + wxString m_OptDisplayPadsChoices[] = { _("Sketch"), _("Filled") }; + int m_OptDisplayPadsNChoices = sizeof( m_OptDisplayPadsChoices ) / sizeof( wxString ); + m_OptDisplayPads = new wxRadioBox( this, ID_PADS_SHAPES, _("Pad Shapes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayPadsNChoices, m_OptDisplayPadsChoices, 1, wxRA_SPECIFY_COLS ); + m_OptDisplayPads->SetSelection( 1 ); + bRModuleSizer->Add( m_OptDisplayPads, 0, wxALL|wxEXPAND, 5 ); + + m_OptDisplayPadClearence = new wxCheckBox( this, wxID_ANY, _("Show pad clearance"), wxDefaultPosition, wxDefaultSize, 0 ); + bRModuleSizer->Add( m_OptDisplayPadClearence, 0, wxALL, 5 ); + + m_OptDisplayPadNumber = new wxCheckBox( this, wxID_ANY, _("Show pad number"), wxDefaultPosition, wxDefaultSize, 0 ); + m_OptDisplayPadNumber->SetValue(true); + bRModuleSizer->Add( m_OptDisplayPadNumber, 0, wxALL, 5 ); + + m_OptDisplayPadNoConn = new wxCheckBox( this, wxID_ANY, _("Show pad NoConnect"), wxDefaultPosition, wxDefaultSize, 0 ); + m_OptDisplayPadNoConn->SetValue(true); + bRModuleSizer->Add( m_OptDisplayPadNoConn, 0, wxALL, 5 ); + + sMiddleRightSizer->Add( bRModuleSizer, 0, 0, 5 ); + + bMainSizer->Add( sMiddleRightSizer, 0, wxEXPAND|wxALL, 5 ); + + wxBoxSizer* bRightSizer; + bRightSizer = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sRightUpperSizer; + sRightUpperSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Others:") ), wxVERTICAL ); + + wxString m_OptDisplayDrawingsChoices[] = { _("Line"), _("Filled"), _("Sketch") }; + int m_OptDisplayDrawingsNChoices = sizeof( m_OptDisplayDrawingsChoices ) / sizeof( wxString ); + m_OptDisplayDrawings = new wxRadioBox( this, wxID_ANY, _("Display other items:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayDrawingsNChoices, m_OptDisplayDrawingsChoices, 1, wxRA_SPECIFY_COLS ); + m_OptDisplayDrawings->SetSelection( 1 ); + sRightUpperSizer->Add( m_OptDisplayDrawings, 0, wxALL|wxEXPAND, 5 ); + + wxString m_Show_Page_LimitsChoices[] = { _("Yes"), _("No") }; + int m_Show_Page_LimitsNChoices = sizeof( m_Show_Page_LimitsChoices ) / sizeof( wxString ); + m_Show_Page_Limits = new wxRadioBox( this, wxID_ANY, _("Show page limits"), wxDefaultPosition, wxDefaultSize, m_Show_Page_LimitsNChoices, m_Show_Page_LimitsChoices, 1, wxRA_SPECIFY_COLS ); + m_Show_Page_Limits->SetSelection( 0 ); + sRightUpperSizer->Add( m_Show_Page_Limits, 0, wxALL|wxEXPAND, 5 ); + + bRightSizer->Add( sRightUpperSizer, 1, wxEXPAND, 5 ); + + + bRightSizer->Add( 10, 10, 0, 0, 5 ); + + m_buttonOK = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bRightSizer->Add( m_buttonOK, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + m_buttonCANCEL = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bRightSizer->Add( m_buttonCANCEL, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + bMainSizer->Add( bRightSizer, 0, wxEXPAND|wxALL, 5 ); + + this->SetSizer( bMainSizer ); + this->Layout(); + + // Connect Events + m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this ); + m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this ); +} + +DIALOG_DISPLAY_OPTIONS_BASE::~DIALOG_DISPLAY_OPTIONS_BASE() +{ + // Disconnect Events + m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnOkClick ), NULL, this ); + m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_OPTIONS_BASE::OnCancelClick ), NULL, this ); + +} diff --git a/pcbnew/dialogs/dialog_display_options_base.fbp b/pcbnew/dialogs/dialog_display_options_base.fbp index 386fa1e56d..50d1007ad5 100644 --- a/pcbnew/dialogs/dialog_display_options_base.fbp +++ b/pcbnew/dialogs/dialog_display_options_base.fbp @@ -1,1516 +1,1067 @@ - - - - - - C++ - 1 - source_name - 0 - UTF-8 - connect - dialog_display_options_base - 1000 - none - 1 - DialogDisplayOptions_base - - . - - 1 - 1 - 1 - 0 - - 1 - 1 - 1 - 1 - 0 - - - - 1 - - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - impl_virtual - - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 1 - DIALOG_DISPLAY_OPTIONS_BASE - 1 - - - 1 - - - Resizable - - 1 - 731,291 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - - Display options - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bMainSizer - wxHORIZONTAL - none - - 5 - wxEXPAND|wxALL - 0 - - wxID_ANY - Tracks and vias: - - sLeftBoxSizer - wxVERTICAL - none - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - 1 - 0 - "Sketch" "Filled" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_DISPLAY_TRACK - Tracks: - - 1 - 0 - - 0 - - 1 - m_OptDisplayTracks - 1 - - - protected - 1 - - - Resizable - - 1 - 1 - - wxRA_SPECIFY_COLS - - 0 - Select how tracks are displayed - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - 1 - 0 - "Sketch" "Filled" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_VIAS_SHAPES - Via Shapes: - - 1 - 0 - - 0 - - 1 - m_OptDisplayVias - 1 - - - protected - 1 - - - Resizable - - 1 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - 1 - 0 - "Never" "Defined holes" "Always" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_VIAS_HOLES - Show Via Holes: - - 1 - 0 - - 0 - - 1 - m_OptDisplayViaHole - 1 - - - protected - 1 - - - Resizable - - 1 - 1 - - wxRA_SPECIFY_COLS - - 0 - Show (or not) via holes. If Defined Holes is selected, only the non default size holes are shown - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - wxID_ANY - Routing help: - - sbMiddleLeftSizer - wxVERTICAL - none - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - 1 - 0 - "Do not show" "On pads" "On tracks" "On pads and tracks" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show Net Names: - - 1 - 0 - - 0 - - 1 - m_ShowNetNamesOption - 1 - - - protected - 1 - - - Resizable - - 3 - 1 - - wxRA_SPECIFY_COLS - - 0 - Show or not net names on pads and/or tracks - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - 1 - 0 - "Never" "New track" "New track with via area" "Always" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_SHOW_CLEARANCE - Show Tracks Clearance: - - 1 - 0 - - 0 - - 1 - m_OptDisplayTracksClearance - 1 - - - protected - 1 - - - Resizable - - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - Show( or not) tracks clearance area. If New track is selected, track clearance area is shown only when creating the track. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALL - 0 - - wxID_ANY - Footprints: - - sMiddleRightSizer - wxHORIZONTAL - none - - - 5 - - 0 - - - bLModuleSizer - wxVERTICAL - none - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - 1 - 0 - "Line" "Filled" "Sketch" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_EDGES_MODULES - Module Edges: - - 1 - 0 - - 0 - - 1 - m_OptDisplayModEdges - 1 - - - protected - 1 - - - Resizable - - 1 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - 1 - 0 - "Line" "Filled" "Sketch" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_TEXT_MODULES - Texts: - - 1 - 0 - - 0 - - 1 - m_OptDisplayModTexts - 1 - - - protected - 1 - - - Resizable - - 1 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - wxID_ANY - Pad Options: - - bRModuleSizer - wxVERTICAL - none - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - 1 - 0 - "Sketch" "Filled" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_PADS_SHAPES - Pad Shapes: - - 1 - 0 - - 0 - - 1 - m_OptDisplayPads - 1 - - - protected - 1 - - - Resizable - - 1 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show pad clearance - - 0 - - 0 - - 1 - m_OptDisplayPadClearence - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show pad number - - 0 - - 0 - - 1 - m_OptDisplayPadNumber - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show pad NoConnect - - 0 - - 0 - - 1 - m_OptDisplayPadNoConn - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALL - 0 - - - bRightSizer - wxVERTICAL - none - - 5 - wxEXPAND - 1 - - wxID_ANY - Others: - - sRightUpperSizer - wxVERTICAL - none - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - 1 - 0 - "Line" "Filled" "Sketch" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Display other items: - - 1 - 0 - - 0 - - 1 - m_OptDisplayDrawings - 1 - - - protected - 1 - - - Resizable - - 1 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - 1 - 0 - "Yes" "No" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show page limits - - 1 - 0 - - 0 - - 1 - m_Show_Page_Limits - 1 - - - protected - 1 - - - Resizable - - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - 10 - protected - 10 - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_OK - OK - - 0 - - 0 - - 1 - m_buttonOK - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnOkClick - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_CANCEL - Cancel - - 0 - - 0 - - 1 - m_buttonCANCEL - 1 - - - protected - 1 - - - Resizable - - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnCancelClick - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + C++ + 1 + source_name + 0 + UTF-8 + connect + dialog_display_options_base + 1000 + none + 1 + DialogDisplayOptions_base + + . + + 1 + 1 + 1 + 0 + + + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DIALOG_DISPLAY_OPTIONS_BASE + + 731,291 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + + Display options + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bMainSizer + wxHORIZONTAL + none + + 5 + wxEXPAND|wxALL + 0 + + wxID_ANY + Tracks and vias: + + sLeftBoxSizer + wxVERTICAL + none + + + 5 + wxALL|wxEXPAND + 0 + + + "Sketch" "Filled" + + 1 + 1 + + + 0 + wxID_DISPLAY_TRACK + Tracks: + 1 + + + m_OptDisplayTracks + protected + + 1 + + wxRA_SPECIFY_COLS + + Select how tracks are displayed + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "Sketch" "Filled" + + 1 + 1 + + + 0 + ID_VIAS_SHAPES + Via Shapes: + 1 + + + m_OptDisplayVias + protected + + 1 + + wxRA_SPECIFY_COLS + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "Never" "Defined holes" "Always" + + 1 + 1 + + + 0 + ID_VIAS_HOLES + Show Via Holes: + 1 + + + m_OptDisplayViaHole + protected + + 1 + + wxRA_SPECIFY_COLS + + Show (or not) via holes. If Defined Holes is selected, only the non default size holes are shown + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Routing help: + + sbMiddleLeftSizer + wxVERTICAL + none + + + 5 + wxALL + 0 + + + "Do not show" "On pads" "On tracks" "On pads and tracks" + + 1 + 1 + + + 0 + wxID_ANY + Show Net Names: + 1 + + + m_ShowNetNamesOption + protected + + 3 + + wxRA_SPECIFY_COLS + + Show or not net names on pads and/or tracks + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "Never" "New track" "New track with via area" "New and edited tracks with via area" "Always" + + 1 + 1 + + + 0 + ID_SHOW_CLEARANCE + Show Tracks Clearance: + 1 + + + m_OptDisplayTracksClearance + protected + + 3 + + wxRA_SPECIFY_COLS + + Show( or not) tracks clearance area. If New track is selected, track clearance area is shown only when creating the track. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALL + 0 + + wxID_ANY + Footprints: + + sMiddleRightSizer + wxHORIZONTAL + none + + + 5 + + 0 + + + bLModuleSizer + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + "Line" "Filled" "Sketch" + + 1 + 1 + + + 0 + ID_EDGES_MODULES + Module Edges: + 1 + + + m_OptDisplayModEdges + protected + + 1 + + wxRA_SPECIFY_COLS + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "Line" "Filled" "Sketch" + + 1 + 1 + + + 0 + ID_TEXT_MODULES + Texts: + 1 + + + m_OptDisplayModTexts + protected + + 1 + + wxRA_SPECIFY_COLS + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + wxID_ANY + Pad Options: + + bRModuleSizer + wxVERTICAL + none + + + 5 + wxALL|wxEXPAND + 0 + + + "Sketch" "Filled" + + 1 + 1 + + + 0 + ID_PADS_SHAPES + Pad Shapes: + 1 + + + m_OptDisplayPads + protected + + 1 + + wxRA_SPECIFY_COLS + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 0 + + 1 + 1 + + + 0 + wxID_ANY + Show pad clearance + + + m_OptDisplayPadClearence + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + 1 + 1 + + + 0 + wxID_ANY + Show pad number + + + m_OptDisplayPadNumber + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + 1 + + 1 + 1 + + + 0 + wxID_ANY + Show pad NoConnect + + + m_OptDisplayPadNoConn + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALL + 0 + + + bRightSizer + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + wxID_ANY + Others: + + sRightUpperSizer + wxVERTICAL + none + + + 5 + wxALL|wxEXPAND + 0 + + + "Line" "Filled" "Sketch" + + 1 + 1 + + + 0 + wxID_ANY + Display other items: + 1 + + + m_OptDisplayDrawings + protected + + 1 + + wxRA_SPECIFY_COLS + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + "Yes" "No" + + 1 + 1 + + + 0 + wxID_ANY + Show page limits + 1 + + + m_Show_Page_Limits + protected + + 0 + + wxRA_SPECIFY_COLS + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + 10 + protected + 10 + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + + + 1 + 0 + 1 + + + 0 + wxID_OK + OK + + + m_buttonOK + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnOkClick + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 0 + + + + 1 + 0 + 1 + + + 0 + wxID_CANCEL + Cancel + + + m_buttonCANCEL + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnCancelClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_display_options_base.h b/pcbnew/dialogs/dialog_display_options_base.h index 0d03dd08f9..c15398972d 100644 --- a/pcbnew/dialogs/dialog_display_options_base.h +++ b/pcbnew/dialogs/dialog_display_options_base.h @@ -1,75 +1,75 @@ -/////////////////////////////////////////////////////////////////////////// -// 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 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -/// 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__ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 6 2011) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __dialog_display_options_base__ +#define __dialog_display_options_base__ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// 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__ diff --git a/pcbnew/move_or_drag_track.cpp b/pcbnew/move_or_drag_track.cpp index 654324b4af..3c57887850 100644 --- a/pcbnew/move_or_drag_track.cpp +++ b/pcbnew/move_or_drag_track.cpp @@ -129,6 +129,8 @@ static void Abort_MoveTrack( EDA_DRAW_PANEL* Panel, wxDC* DC ) EraseDragList(); Panel->SetMouseCapture( NULL, NULL ); + + Panel->Refresh(); } @@ -1036,6 +1038,8 @@ bool PCB_EDIT_FRAME::PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC ) OnModify(); DrawPanel->SetMouseCapture( NULL, NULL ); + DrawPanel->Refresh(); + if( current_net_code > 0 ) TestNetConnection( DC, current_net_code );