From d055f673187945f8758bc0d8d5523421d021777d Mon Sep 17 00:00:00 2001 From: dickelbeck Date: Tue, 24 Feb 2009 22:41:30 +0000 Subject: [PATCH] remove redrawing/flashing, fix magnetic tracks option --- CHANGELOG.txt | 15 +- pcbnew/dialog_display_options_base.cpp | 11 +- pcbnew/dialog_display_options_base.fbp | 59 +++++++- pcbnew/dialog_display_options_base.h | 8 +- pcbnew/dialog_general_options.cpp | 137 +++++++++--------- pcbnew/dialog_general_options.h | 23 +-- ...ialog_general_options_BoardEditor_base.cpp | 14 +- ...ialog_general_options_BoardEditor_base.fbp | 87 ++++++++++- .../dialog_general_options_BoardEditor_base.h | 8 +- 9 files changed, 254 insertions(+), 108 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 51de97f5e3..e129717c9a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,17 +5,26 @@ Started 2007-June-11 Please add newer entries at the top, list the date and your name with email address. +2009-Feb-24 UPDATE Dick Hollenbeck +================================================================================ +++pcbnew + * dialog boxes calling OnInitDialog are flashing because these functions + change the size of controls that are already on screen. This leads to + an annoying resize operation. So I renamed OnInitDialog(event) to + void init() and call it from the constructors. Did this for + dialog_general_options.cpp and dialog_display_options. + * dialog_general_options was not setting g_MagneticPadOption and g_MagneticTrackOption + + 2009-Feb-24 UPDATE Jean-Pierre Charras ================================================================================ ++pcbnew: bug fix: 2628615 Error message after right click into zone 2625434 Crash after trying to edit a line/drawing - ++cvpcb fix: 2625090 CVpcb - language selection - - + 2009-Feb-17 UPDATE Jean-Pierre Charras ================================================================================ diff --git a/pcbnew/dialog_display_options_base.cpp b/pcbnew/dialog_display_options_base.cpp index 16fc31d3e1..e28cd7f84d 100644 --- a/pcbnew/dialog_display_options_base.cpp +++ b/pcbnew/dialog_display_options_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Feb 8 2009) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -69,17 +69,14 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow 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); - + 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); - + m_OptDisplayPadNoConn->SetValue(true); bRModuleSizer->Add( m_OptDisplayPadNoConn, 0, wxALL, 5 ); sMiddleSizer->Add( bRModuleSizer, 0, 0, 5 ); @@ -125,7 +122,6 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow this->Layout(); // Connect Events - this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DialogDisplayOptions_base::OnInitDialog ) ); m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogDisplayOptions_base::OnOkClick ), NULL, this ); m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogDisplayOptions_base::OnCancelClick ), NULL, this ); } @@ -133,7 +129,6 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow DialogDisplayOptions_base::~DialogDisplayOptions_base() { // Disconnect Events - this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DialogDisplayOptions_base::OnInitDialog ) ); m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogDisplayOptions_base::OnOkClick ), NULL, this ); m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogDisplayOptions_base::OnCancelClick ), NULL, this ); } diff --git a/pcbnew/dialog_display_options_base.fbp b/pcbnew/dialog_display_options_base.fbp index d7b4e7320b..c734c279a9 100644 --- a/pcbnew/dialog_display_options_base.fbp +++ b/pcbnew/dialog_display_options_base.fbp @@ -7,6 +7,7 @@ 1 UTF-8 connect + impl_virtual dialog_display_options_base 1000 none @@ -37,6 +38,10 @@ + + wxFILTER_NONE + wxDefaultValidator + @@ -49,7 +54,7 @@ - OnInitDialog + @@ -112,6 +117,10 @@ wxRA_SPECIFY_COLS + + wxFILTER_NONE + wxDefaultValidator + @@ -166,6 +175,10 @@ wxRA_SPECIFY_COLS + + wxFILTER_NONE + wxDefaultValidator + @@ -220,6 +233,10 @@ wxRA_SPECIFY_COLS + + wxFILTER_NONE + wxDefaultValidator + @@ -297,6 +314,10 @@ wxRA_SPECIFY_COLS + + wxFILTER_NONE + wxDefaultValidator + @@ -351,6 +372,10 @@ wxRA_SPECIFY_COLS + + wxFILTER_NONE + wxDefaultValidator + @@ -419,6 +444,10 @@ wxRA_SPECIFY_COLS + + wxFILTER_NONE + wxDefaultValidator + @@ -471,6 +500,10 @@ + + wxFILTER_NONE + wxDefaultValidator + @@ -523,6 +556,10 @@ + + wxFILTER_NONE + wxDefaultValidator + @@ -575,6 +612,10 @@ + + wxFILTER_NONE + wxDefaultValidator + @@ -654,6 +695,10 @@ wxRA_SPECIFY_COLS + + wxFILTER_NONE + wxDefaultValidator + @@ -708,6 +753,10 @@ wxRA_SPECIFY_COLS + + wxFILTER_NONE + wxDefaultValidator + @@ -772,6 +821,10 @@ + + wxFILTER_NONE + wxDefaultValidator + @@ -824,6 +877,10 @@ + + wxFILTER_NONE + wxDefaultValidator + diff --git a/pcbnew/dialog_display_options_base.h b/pcbnew/dialog_display_options_base.h index c84dbcc36b..303f5e5a60 100644 --- a/pcbnew/dialog_display_options_base.h +++ b/pcbnew/dialog_display_options_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Feb 8 2009) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -58,12 +58,12 @@ class DialogDisplayOptions_base : public wxDialog wxButton* m_buttonCANCEL; // Virtual event handlers, overide them in your derived class - virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); } - virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } + 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 = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 559,303 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DialogDisplayOptions_base(); diff --git a/pcbnew/dialog_general_options.cpp b/pcbnew/dialog_general_options.cpp index b6315c9ee1..d93a042538 100644 --- a/pcbnew/dialog_general_options.cpp +++ b/pcbnew/dialog_general_options.cpp @@ -3,8 +3,8 @@ // Author: jean-pierre Charras ///////////////////////////////////////////////////////////////////////////// /* functions relatives to the dialogs opened from the main menu : - Prefernces/general - Prefernces/display + Prefernces/general + Prefernces/display */ #include "fctsys.h" #include "common.h" @@ -19,22 +19,24 @@ #include "dialog_general_options.h" #include "dialog_track_options.h" + /***********************************************************************************/ Dialog_GeneralOptions::Dialog_GeneralOptions( WinEDA_PcbFrame* parent, wxDC* DC ) : - DialogGeneralOptionsBoardEditor_base( parent ) + DialogGeneralOptionsBoardEditor_base( parent ) /***********************************************************************************/ { m_Parent = parent; m_DC = DC; + + init(); } /********************************************************************/ -void Dialog_GeneralOptions::OnInitDialog( wxInitDialogEvent& event ) +void Dialog_GeneralOptions::init() /********************************************************************/ { SetFont( *g_DialogFont ); - SetFocus(); - + SetFocus(); /* Set display options */ m_PolarDisplay->SetSelection( DisplayOpt.DisplayPolarCood ? 1 : 0 ); @@ -44,15 +46,15 @@ void Dialog_GeneralOptions::OnInitDialog( wxInitDialogEvent& event ) wxString timevalue; timevalue << g_TimeOut / 60; m_SaveTime->SetValue( timevalue ); - int layer_count[] = {1,2,4,6,8,10,12,14,16}; - m_LayerNumber->SetSelection(1); - for ( unsigned ii = 0; ii < sizeof(layer_count); ii++ ) - { - if ( g_DesignSettings.m_CopperLayerCount != layer_count[ii] ) - continue; - m_LayerNumber->SetSelection(ii); - break; - } + int layer_count[] = {1,2,4,6,8,10,12,14,16}; + m_LayerNumber->SetSelection(1); + for ( unsigned ii = 0; ii < sizeof(layer_count); ii++ ) + { + if ( g_DesignSettings.m_CopperLayerCount != layer_count[ii] ) + continue; + m_LayerNumber->SetSelection(ii); + break; + } m_MaxShowLinks->SetValue( g_MaxLinksShowed ); @@ -102,7 +104,7 @@ void Dialog_GeneralOptions::OnOkClick( wxCommandEvent& event ) g_TimeOut = 60 * m_SaveTime->GetValue(); /* Mise a jour de la combobox d'affichage de la couche active */ - int layer_count[] = {1,2,4,6,8,10,12,14,16}; + int layer_count[] = {1,2,4,6,8,10,12,14,16}; g_DesignSettings.m_CopperLayerCount = layer_count[m_LayerNumber->GetSelection()]; m_Parent->ReCreateLayerBox( NULL ); @@ -120,36 +122,41 @@ void Dialog_GeneralOptions::OnOkClick( wxCommandEvent& event ) m_Parent->DrawPanel->m_AutoPAN_Enable = m_AutoPANOpt->GetValue(); g_TwoSegmentTrackBuild = m_Track_DoubleSegm_Ctrl->GetValue(); + g_MagneticPadOption = m_MagneticPadOptCtrl->GetSelection(); + g_MagneticTrackOption = m_MagneticTrackOptCtrl->GetSelection(); + EndModal( 1 ); } /*******************************************************************************/ Dialog_Display_Options::Dialog_Display_Options( WinEDA_BasePcbFrame* parent ) : - DialogDisplayOptions_base(parent) + DialogDisplayOptions_base(parent) /*******************************************************************************/ { - m_Parent = parent; + m_Parent = parent; + + init(); } /****************************************************************/ -void Dialog_Display_Options::OnInitDialog( wxInitDialogEvent& event ) +void Dialog_Display_Options::init() /****************************************************************/ { - SetFocus(); + SetFocus(); if ( DisplayOpt.DisplayPcbTrackFill ) - m_OptDisplayTracks->SetSelection(1); - if ( DisplayOpt.DisplayTrackIsol ) - m_OptDisplayTracksClearance->SetSelection(0); - else if ( g_ShowIsolDuringCreateTrack ) - m_OptDisplayTracksClearance->SetSelection(1); - else m_OptDisplayTracksClearance->SetSelection(2); + m_OptDisplayTracks->SetSelection(1); + if ( DisplayOpt.DisplayTrackIsol ) + m_OptDisplayTracksClearance->SetSelection(0); + else if ( g_ShowIsolDuringCreateTrack ) + m_OptDisplayTracksClearance->SetSelection(1); + else m_OptDisplayTracksClearance->SetSelection(2); - if ( DisplayOpt.DisplayPadFill ) - m_OptDisplayPads->SetSelection(1); + if ( DisplayOpt.DisplayPadFill ) + m_OptDisplayPads->SetSelection(1); - m_Show_Page_Limits->SetSelection( g_ShowPageLimits ? 0 : 1); + m_Show_Page_Limits->SetSelection( g_ShowPageLimits ? 0 : 1); m_OptDisplayViaHole->SetSelection( DisplayOpt.m_DisplayViaMode ); m_OptDisplayModTexts->SetSelection( DisplayOpt.DisplayModText ); @@ -178,54 +185,54 @@ void Dialog_Display_Options::OnOkClick(wxCommandEvent& event) /* Update variables with new options */ { - if ( m_Show_Page_Limits->GetSelection() == 0 ) g_ShowPageLimits = TRUE; - else g_ShowPageLimits = FALSE; + if ( m_Show_Page_Limits->GetSelection() == 0 ) g_ShowPageLimits = TRUE; + else g_ShowPageLimits = FALSE; - if ( m_OptDisplayTracks->GetSelection() == 1) - DisplayOpt.DisplayPcbTrackFill = TRUE; - else DisplayOpt.DisplayPcbTrackFill = FALSE; + if ( m_OptDisplayTracks->GetSelection() == 1) + DisplayOpt.DisplayPcbTrackFill = TRUE; + else DisplayOpt.DisplayPcbTrackFill = FALSE; - m_Parent->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; - DisplayOpt.m_DisplayViaMode = m_OptDisplayViaHole->GetSelection(); + m_Parent->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; + DisplayOpt.m_DisplayViaMode = m_OptDisplayViaHole->GetSelection(); - switch ( m_OptDisplayTracksClearance->GetSelection() ) - { - case 0: - DisplayOpt.DisplayTrackIsol = TRUE; - g_ShowIsolDuringCreateTrack = TRUE; - break; - case 1: - DisplayOpt.DisplayTrackIsol = FALSE; - g_ShowIsolDuringCreateTrack = TRUE; - break; - case 2: - DisplayOpt.DisplayTrackIsol = FALSE; - g_ShowIsolDuringCreateTrack = FALSE; - break; - } + switch ( m_OptDisplayTracksClearance->GetSelection() ) + { + case 0: + DisplayOpt.DisplayTrackIsol = TRUE; + g_ShowIsolDuringCreateTrack = TRUE; + break; + case 1: + DisplayOpt.DisplayTrackIsol = FALSE; + g_ShowIsolDuringCreateTrack = TRUE; + break; + case 2: + DisplayOpt.DisplayTrackIsol = FALSE; + g_ShowIsolDuringCreateTrack = FALSE; + break; + } - m_Parent->m_DisplayModText = DisplayOpt.DisplayModText = - m_OptDisplayModTexts->GetSelection(); - m_Parent->m_DisplayModEdge = DisplayOpt.DisplayModEdge = - m_OptDisplayModEdges->GetSelection(); + m_Parent->m_DisplayModText = DisplayOpt.DisplayModText = + m_OptDisplayModTexts->GetSelection(); + m_Parent->m_DisplayModEdge = DisplayOpt.DisplayModEdge = + m_OptDisplayModEdges->GetSelection(); - if (m_OptDisplayPads->GetSelection() == 1 ) - DisplayOpt.DisplayPadFill = TRUE; - else DisplayOpt.DisplayPadFill = FALSE; + if (m_OptDisplayPads->GetSelection() == 1 ) + DisplayOpt.DisplayPadFill = TRUE; + else DisplayOpt.DisplayPadFill = FALSE; - m_Parent->m_DisplayPadFill = DisplayOpt.DisplayPadFill; + m_Parent->m_DisplayPadFill = DisplayOpt.DisplayPadFill; - DisplayOpt.DisplayPadIsol = m_OptDisplayPadClearence->GetValue(); + DisplayOpt.DisplayPadIsol = m_OptDisplayPadClearence->GetValue(); - m_Parent->m_DisplayPadNum = DisplayOpt.DisplayPadNum = m_OptDisplayPadNumber->GetValue(); + m_Parent->m_DisplayPadNum = DisplayOpt.DisplayPadNum = m_OptDisplayPadNumber->GetValue(); - DisplayOpt.DisplayPadNoConn = m_OptDisplayPadNoConn->GetValue(); + DisplayOpt.DisplayPadNoConn = m_OptDisplayPadNoConn->GetValue(); - DisplayOpt.DisplayDrawItems = m_OptDisplayDrawings->GetSelection(); + DisplayOpt.DisplayDrawItems = m_OptDisplayDrawings->GetSelection(); - m_Parent->DrawPanel->Refresh(TRUE); + m_Parent->DrawPanel->Refresh(TRUE); - EndModal(1); + EndModal(1); } diff --git a/pcbnew/dialog_general_options.h b/pcbnew/dialog_general_options.h index 469f9360c7..d91e78773c 100644 --- a/pcbnew/dialog_general_options.h +++ b/pcbnew/dialog_general_options.h @@ -8,12 +8,14 @@ class Dialog_GeneralOptions : public DialogGeneralOptionsBoardEditor_base private: WinEDA_PcbFrame* m_Parent; wxDC* m_DC; + + void init(); + public: - Dialog_GeneralOptions( WinEDA_PcbFrame* parent, wxDC* DC ); - ~Dialog_GeneralOptions() {}; - void OnInitDialog( wxInitDialogEvent& event ); - void OnOkClick( wxCommandEvent& event ); - void OnCancelClick( wxCommandEvent& event ); + Dialog_GeneralOptions( WinEDA_PcbFrame* parent, wxDC* DC ); + ~Dialog_GeneralOptions() {}; + void OnOkClick( wxCommandEvent& event ); + void OnCancelClick( wxCommandEvent& event ); }; @@ -22,12 +24,13 @@ class Dialog_Display_Options : public DialogDisplayOptions_base private: WinEDA_BasePcbFrame* m_Parent; + void init(); + public: - Dialog_Display_Options( WinEDA_BasePcbFrame* parent ); - ~Dialog_Display_Options( ) { }; - void OnInitDialog( wxInitDialogEvent& event ); - void OnOkClick( wxCommandEvent& event ); - void OnCancelClick( wxCommandEvent& event ); + Dialog_Display_Options( WinEDA_BasePcbFrame* parent ); + ~Dialog_Display_Options( ) { }; + void OnOkClick( wxCommandEvent& event ); + void OnCancelClick( wxCommandEvent& event ); }; #endif // __dialog_general_options_h diff --git a/pcbnew/dialog_general_options_BoardEditor_base.cpp b/pcbnew/dialog_general_options_BoardEditor_base.cpp index b21610b12f..8a6a04411c 100644 --- a/pcbnew/dialog_general_options_BoardEditor_base.cpp +++ b/pcbnew/dialog_general_options_BoardEditor_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Feb 8 2009) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -80,50 +80,42 @@ DialogGeneralOptionsBoardEditor_base::DialogGeneralOptionsBoardEditor_base( wxWi bMiddleRightBoxSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options:") ), wxVERTICAL ); m_DrcOn = new wxCheckBox( this, wxID_DRC_ONOFF, _("Drc ON"), wxDefaultPosition, wxDefaultSize, 0 ); - m_DrcOn->SetValue(true); - + m_DrcOn->SetValue(true); m_DrcOn->SetToolTip( _("Enable/disable the DRC control.\nWhen DRC is disable, all connections are allowed.") ); bMiddleRightBoxSizer->Add( m_DrcOn, 0, wxALL|wxEXPAND, 5 ); m_ShowGlobalRatsnest = new wxCheckBox( this, wxID_GENERAL_RATSNEST, _("Show Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ShowGlobalRatsnest->SetToolTip( _("Show (or not) the full rastnest.") ); bMiddleRightBoxSizer->Add( m_ShowGlobalRatsnest, 0, wxALL, 5 ); m_ShowModuleRatsnest = new wxCheckBox( this, wxID_RATSNEST_MODULE, _("Show Mod Ratsnest"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ShowModuleRatsnest->SetToolTip( _("Shows (or not) the local ratsnest relative to a footprint, when moving it.\nThis ratsnest is useful to place a footprint.") ); bMiddleRightBoxSizer->Add( m_ShowModuleRatsnest, 0, wxALL, 5 ); m_TrackAutodel = new wxCheckBox( this, wxID_TRACK_AUTODEL, _("Tracks Auto Del"), wxDefaultPosition, wxDefaultSize, 0 ); - m_TrackAutodel->SetToolTip( _("Enable/disable the automatic track deletion when recreating a track.") ); bMiddleRightBoxSizer->Add( m_TrackAutodel, 0, wxALL, 5 ); m_Track_45_Only_Ctrl = new wxCheckBox( this, wxID_TRACKS45, _("Track only 45 degrees"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Track_45_Only_Ctrl->SetToolTip( _("If enabled, force tracks directions to H, V or 45 degrees, when creating a track.") ); bMiddleRightBoxSizer->Add( m_Track_45_Only_Ctrl, 0, wxALL, 5 ); m_Segments_45_Only_Ctrl = new wxCheckBox( this, wxID_SEGMENTS45, _("Segments 45 Only"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Segments_45_Only_Ctrl->SetToolTip( _("If enabled, force segments directions to H, V or 45 degrees, when creating a segment on technical layers.") ); bMiddleRightBoxSizer->Add( m_Segments_45_Only_Ctrl, 0, wxALL, 5 ); m_AutoPANOpt = new wxCheckBox( this, wxID_AUTOPAN, _("Auto PAN"), wxDefaultPosition, wxDefaultSize, 0 ); - m_AutoPANOpt->SetToolTip( _("Allows auto pan when creating a track, or moving an item.") ); bMiddleRightBoxSizer->Add( m_AutoPANOpt, 0, wxALL, 5 ); m_Track_DoubleSegm_Ctrl = new wxCheckBox( this, wxID_ANY, _("Double Segm Track"), wxDefaultPosition, wxDefaultSize, 0 ); - m_Track_DoubleSegm_Ctrl->SetToolTip( _("If enabled, uses two track segments, with 45 degrees angle between them when creating a new track ") ); bMiddleRightBoxSizer->Add( m_Track_DoubleSegm_Ctrl, 0, wxALL, 5 ); @@ -166,7 +158,6 @@ DialogGeneralOptionsBoardEditor_base::DialogGeneralOptionsBoardEditor_base( wxWi this->Layout(); // Connect Events - this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DialogGeneralOptionsBoardEditor_base::OnInitDialog ) ); m_buttonOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnOkClick ), NULL, this ); m_buttonCANCEL->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnCancelClick ), NULL, this ); } @@ -174,7 +165,6 @@ DialogGeneralOptionsBoardEditor_base::DialogGeneralOptionsBoardEditor_base( wxWi DialogGeneralOptionsBoardEditor_base::~DialogGeneralOptionsBoardEditor_base() { // Disconnect Events - this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DialogGeneralOptionsBoardEditor_base::OnInitDialog ) ); m_buttonOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnOkClick ), NULL, this ); m_buttonCANCEL->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogGeneralOptionsBoardEditor_base::OnCancelClick ), NULL, this ); } diff --git a/pcbnew/dialog_general_options_BoardEditor_base.fbp b/pcbnew/dialog_general_options_BoardEditor_base.fbp index 1dc0ab1fd9..b4e29c29a3 100644 --- a/pcbnew/dialog_general_options_BoardEditor_base.fbp +++ b/pcbnew/dialog_general_options_BoardEditor_base.fbp @@ -7,6 +7,7 @@ 1 UTF-8 connect + impl_virtual dialog_general_options_BoardEditor_base 1000 none @@ -37,6 +38,10 @@ General settings + + wxFILTER_NONE + wxDefaultValidator + @@ -49,7 +54,7 @@ - OnInitDialog + @@ -109,6 +114,10 @@ wxRA_SPECIFY_COLS Activates the display of relative coordinates from relative origin (set by the space key) to the cursor, in polar coordinates (angle and distance) + + wxFILTER_NONE + wxDefaultValidator + @@ -163,6 +172,10 @@ wxRA_SPECIFY_COLS Selection of units used to display dimensions and positions of items + + wxFILTER_NONE + wxDefaultValidator + @@ -217,6 +230,10 @@ wxRA_SPECIFY_COLS Main cursor shape selection (small cross or large cursor) + + wxFILTER_NONE + wxDefaultValidator + @@ -282,6 +299,10 @@ wxRA_SPECIFY_COLS Active copper layers count selection + + wxFILTER_NONE + wxDefaultValidator + @@ -333,6 +354,10 @@ + + wxFILTER_NONE + wxDefaultValidator + @@ -386,6 +411,10 @@ wxSP_ARROW_KEYS Adjust the number of ratsnets shown from cursor to closest pads + + wxFILTER_NONE + wxDefaultValidator + 1 @@ -439,6 +468,10 @@ + + wxFILTER_NONE + wxDefaultValidator + @@ -492,6 +525,10 @@ wxSP_ARROW_KEYS Delay after the first change to create a backup file of the board on disk. + + wxFILTER_NONE + wxDefaultValidator + 0 @@ -560,6 +597,10 @@ Enable/disable the DRC control. When DRC is disable, all connections are allowed. + + wxFILTER_NONE + wxDefaultValidator + @@ -612,6 +653,10 @@ Show (or not) the full rastnest. + + wxFILTER_NONE + wxDefaultValidator + @@ -664,6 +709,10 @@ Shows (or not) the local ratsnest relative to a footprint, when moving it. This ratsnest is useful to place a footprint. + + wxFILTER_NONE + wxDefaultValidator + @@ -716,6 +765,10 @@ Enable/disable the automatic track deletion when recreating a track. + + wxFILTER_NONE + wxDefaultValidator + @@ -768,6 +821,10 @@ If enabled, force tracks directions to H, V or 45 degrees, when creating a track. + + wxFILTER_NONE + wxDefaultValidator + @@ -820,6 +877,10 @@ If enabled, force segments directions to H, V or 45 degrees, when creating a segment on technical layers. + + wxFILTER_NONE + wxDefaultValidator + @@ -872,6 +933,10 @@ Allows auto pan when creating a track, or moving an item. + + wxFILTER_NONE + wxDefaultValidator + @@ -924,6 +989,10 @@ If enabled, uses two track segments, with 45 degrees angle between them when creating a new track + + wxFILTER_NONE + wxDefaultValidator + @@ -989,6 +1058,10 @@ wxRA_SPECIFY_COLS control the capture of the pcb cursor when the mouse cursor enters a pad area + + wxFILTER_NONE + wxDefaultValidator + @@ -1043,6 +1116,10 @@ wxRA_SPECIFY_COLS Control the capture of the pcb cursor when the mouse cursor enters a track + + wxFILTER_NONE + wxDefaultValidator + @@ -1095,6 +1172,10 @@ + + wxFILTER_NONE + wxDefaultValidator + @@ -1147,6 +1228,10 @@ + + wxFILTER_NONE + wxDefaultValidator + diff --git a/pcbnew/dialog_general_options_BoardEditor_base.h b/pcbnew/dialog_general_options_BoardEditor_base.h index 93026ea863..5062099722 100644 --- a/pcbnew/dialog_general_options_BoardEditor_base.h +++ b/pcbnew/dialog_general_options_BoardEditor_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Feb 8 2009) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -72,12 +72,12 @@ class DialogGeneralOptionsBoardEditor_base : public wxDialog wxButton* m_buttonCANCEL; // Virtual event handlers, overide them in your derived class - virtual void OnInitDialog( wxInitDialogEvent& event ){ event.Skip(); } - virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } public: + DialogGeneralOptionsBoardEditor_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("General settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 585,280 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DialogGeneralOptionsBoardEditor_base();