Commit 498f0c91 authored by charras's avatar charras

minor problems fixed

parent bc62df64
...@@ -145,13 +145,13 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID ...@@ -145,13 +145,13 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
bMainSizer->Add( sbSizer2, 0, wxALL|wxEXPAND, 5 ); bMainSizer->Add( sbSizer2, 0, wxALL|wxEXPAND, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer(); m_sdbButtonsSizer = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK ); m_sdbButtonsSizerOK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK ); m_sdbButtonsSizer->AddButton( m_sdbButtonsSizerOK );
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL ); m_sdbButtonsSizerCancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); m_sdbButtonsSizer->AddButton( m_sdbButtonsSizerCancel );
m_sdbSizer1->Realize(); m_sdbButtonsSizer->Realize();
bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxALIGN_RIGHT, 5 ); bMainSizer->Add( m_sdbButtonsSizer, 0, wxALL|wxALIGN_RIGHT, 5 );
this->SetSizer( bMainSizer ); this->SetSizer( bMainSizer );
this->Layout(); this->Layout();
...@@ -168,8 +168,8 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID ...@@ -168,8 +168,8 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_buttonLeftSelAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftSelectAllButton ), NULL, this ); m_buttonLeftSelAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftSelectAllButton ), NULL, this );
m_buttonRightSelAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightSelectAllButton ), NULL, this ); m_buttonRightSelAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightSelectAllButton ), NULL, this );
m_rightClassChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightCBSelection ), NULL, this ); m_rightClassChoice->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightCBSelection ), NULL, this );
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnCancelButtonClick ), NULL, this ); m_sdbButtonsSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnCancelButtonClick ), NULL, this );
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnOkButtonClick ), NULL, this ); m_sdbButtonsSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnOkButtonClick ), NULL, this );
} }
DIALOG_DESIGN_RULES_BASE::~DIALOG_DESIGN_RULES_BASE() DIALOG_DESIGN_RULES_BASE::~DIALOG_DESIGN_RULES_BASE()
...@@ -186,6 +186,6 @@ DIALOG_DESIGN_RULES_BASE::~DIALOG_DESIGN_RULES_BASE() ...@@ -186,6 +186,6 @@ DIALOG_DESIGN_RULES_BASE::~DIALOG_DESIGN_RULES_BASE()
m_buttonLeftSelAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftSelectAllButton ), NULL, this ); m_buttonLeftSelAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnLeftSelectAllButton ), NULL, this );
m_buttonRightSelAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightSelectAllButton ), NULL, this ); m_buttonRightSelAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightSelectAllButton ), NULL, this );
m_rightClassChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightCBSelection ), NULL, this ); m_rightClassChoice->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnRightCBSelection ), NULL, this );
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnCancelButtonClick ), NULL, this ); m_sdbButtonsSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnCancelButtonClick ), NULL, this );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnOkButtonClick ), NULL, this ); m_sdbButtonsSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnOkButtonClick ), NULL, this );
} }
...@@ -942,7 +942,7 @@ ...@@ -942,7 +942,7 @@
<property name="Save">0</property> <property name="Save">0</property>
<property name="Yes">0</property> <property name="Yes">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_sdbSizer1</property> <property name="name">m_sdbButtonsSizer</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<event name="OnApplyButtonClick"></event> <event name="OnApplyButtonClick"></event>
<event name="OnCancelButtonClick">OnCancelButtonClick</event> <event name="OnCancelButtonClick">OnCancelButtonClick</event>
......
...@@ -57,9 +57,9 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog ...@@ -57,9 +57,9 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog
wxChoice* m_rightClassChoice; wxChoice* m_rightClassChoice;
wxListCtrl* m_rightListCtrl; wxListCtrl* m_rightListCtrl;
wxHtmlWindow* m_MessagesList; wxHtmlWindow* m_MessagesList;
wxStdDialogButtonSizer* m_sdbSizer1; wxStdDialogButtonSizer* m_sdbButtonsSizer;
wxButton* m_sdbSizer1OK; wxButton* m_sdbButtonsSizerOK;
wxButton* m_sdbSizer1Cancel; wxButton* m_sdbButtonsSizerCancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnNetClassesNameLeftClick( wxGridEvent& event ){ event.Skip(); } virtual void OnNetClassesNameLeftClick( wxGridEvent& event ){ event.Skip(); }
......
...@@ -81,9 +81,10 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem ) ...@@ -81,9 +81,10 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem )
return; // No change return; // No change
// The segment has changed: redraw it and save it in undo list // The segment has changed: redraw it and save it in undo list
TRACK* oldsegm = (TRACK*) itemsListPicker.GetPickedItem( 0 );
if( DC ) if( DC )
{ {
TRACK* oldsegm = (TRACK*) itemsListPicker.GetPickedItemLink( 0 );
wxASSERT(oldsegm);
DrawPanel->CursorOff( DC ); // Erase cursor shape DrawPanel->CursorOff( DC ); // Erase cursor shape
oldsegm->Draw( DrawPanel, DC, GR_XOR ); // Erase old track shape oldsegm->Draw( DrawPanel, DC, GR_XOR ); // Erase old track shape
aTrackItem->Draw( DrawPanel, DC, GR_OR ); // Display new track shape aTrackItem->Draw( DrawPanel, DC, GR_OR ); // Display new track shape
......
...@@ -163,20 +163,23 @@ bool WinEDA_PcbFrame::Clear_Pcb( bool aQuery ) ...@@ -163,20 +163,23 @@ bool WinEDA_PcbFrame::Clear_Pcb( bool aQuery )
// delete the old BOARD and create a new BOARD so that the default // delete the old BOARD and create a new BOARD so that the default
// layer names are put into the BOARD. // layer names are put into the BOARD.
SetBoard( new BOARD( NULL, this ) ); SetBoard( new BOARD( NULL, this ) );
m_TrackAndViasSizesList_Changed = true;
SetCurItem( NULL );
/* init pointeurs et variables */ /* clear filename, to avoid overwriting an old file */
GetScreen()->m_FileName.Empty(); GetScreen()->m_FileName.Empty();
SetCurItem( NULL ); /* Init new grid size */
/* Init parametres de gestion */
wxRealPoint gridsize = GetScreen()->GetGrid(); wxRealPoint gridsize = GetScreen()->GetGrid();
GetScreen()->Init(); GetScreen()->Init();
GetScreen()->SetGrid( gridsize ); GetScreen()->SetGrid( gridsize );
g_HightLigt_Status = 0; g_HightLigt_Status = 0;
g_DesignSettings.m_CopperLayerCount = 2; // Default copper layers count set to 2: double layer board // Default copper layers count set to 2: double layer board
g_DesignSettings.m_CopperLayerCount = 2;
// Update display:
SetToolbars();
Zoom_Automatique( true ); Zoom_Automatique( true );
return true; return true;
......
...@@ -964,6 +964,7 @@ int WinEDA_PcbFrame::ReadPcbFile( FILE* File, bool Append ) ...@@ -964,6 +964,7 @@ int WinEDA_PcbFrame::ReadPcbFile( FILE* File, bool Append )
board->SynchronizeNetsAndNetClasses( ); board->SynchronizeNetsAndNetClasses( );
board->m_Status_Pcb = 0; board->m_Status_Pcb = 0;
m_TrackAndViasSizesList_Changed = true;
SetToolbars(); SetToolbars();
return 1; return 1;
} }
......
...@@ -223,7 +223,7 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, ...@@ -223,7 +223,7 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
wxConfig* config = wxGetApp().m_EDA_Config; wxConfig* config = wxGetApp().m_EDA_Config;
m_FrameName = wxT( "PcbFrame" ); m_FrameName = wxT( "PcbFrame" );
m_Draw_Sheet_Ref = true; // true pour avoir le cartouche dessine m_Draw_Sheet_Ref = true; // true to display sheet references
m_Draw_Auxiliary_Axis = true; m_Draw_Auxiliary_Axis = true;
m_SelTrackWidthBox = NULL; m_SelTrackWidthBox = NULL;
m_SelViaSizeBox = NULL; m_SelViaSizeBox = NULL;
...@@ -231,6 +231,7 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father, ...@@ -231,6 +231,7 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
m_TrackAndViasSizesList_Changed = false; m_TrackAndViasSizesList_Changed = false;
SetBoard( new BOARD( NULL, this ) ); SetBoard( new BOARD( NULL, this ) );
m_TrackAndViasSizesList_Changed = true;
m_drc = new DRC( this ); // these 2 objects point to each other m_drc = new DRC( this ); // these 2 objects point to each other
......
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