Commit d055f673 authored by dickelbeck's avatar dickelbeck

remove redrawing/flashing, fix magnetic tracks option

parent 89f02110
......@@ -5,18 +5,27 @@ 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 <dick@softplc.com>
================================================================================
++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 <jean-pierre.charras@inpg.fr>
================================================================================
++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 <jean-pierre.charras@inpg.fr>
================================================================================
++gr_basic.cpp
......
///////////////////////////////////////////////////////////////////////////
// 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);
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 );
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 );
}
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////
// 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();
......
......@@ -19,6 +19,7 @@
#include "dialog_general_options.h"
#include "dialog_track_options.h"
/***********************************************************************************/
Dialog_GeneralOptions::Dialog_GeneralOptions( WinEDA_PcbFrame* parent, wxDC* DC ) :
DialogGeneralOptionsBoardEditor_base( parent )
......@@ -26,16 +27,17 @@ Dialog_GeneralOptions::Dialog_GeneralOptions( WinEDA_PcbFrame* parent, wxDC* DC
{
m_Parent = parent;
m_DC = DC;
init();
}
/********************************************************************/
void Dialog_GeneralOptions::OnInitDialog( wxInitDialogEvent& event )
void Dialog_GeneralOptions::init()
/********************************************************************/
{
SetFont( *g_DialogFont );
SetFocus();
/* Set display options */
m_PolarDisplay->SetSelection( DisplayOpt.DisplayPolarCood ? 1 : 0 );
m_UnitsSelection->SetSelection( g_UnitMetric ? 1 : 0 );
......@@ -120,6 +122,9 @@ 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 );
}
......@@ -130,10 +135,12 @@ Dialog_Display_Options::Dialog_Display_Options( WinEDA_BasePcbFrame* parent ) :
/*******************************************************************************/
{
m_Parent = parent;
init();
}
/****************************************************************/
void Dialog_Display_Options::OnInitDialog( wxInitDialogEvent& event )
void Dialog_Display_Options::init()
/****************************************************************/
{
SetFocus();
......
......@@ -8,10 +8,12 @@ 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 );
};
......@@ -22,10 +24,11 @@ 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 );
};
......
///////////////////////////////////////////////////////////////////////////
// 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!
......@@ -81,49 +81,41 @@ DialogGeneralOptionsBoardEditor_base::DialogGeneralOptionsBoardEditor_base( wxWi
m_DrcOn = new wxCheckBox( this, wxID_DRC_ONOFF, _("Drc ON"), wxDefaultPosition, wxDefaultSize, 0 );
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 );
}
///////////////////////////////////////////////////////////////////////////
// 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();
......
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