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
bMainSizer->Add( sbSizer2, 0, wxALL|wxEXPAND, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK );
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();
bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxALIGN_RIGHT, 5 );
m_sdbButtonsSizer = new wxStdDialogButtonSizer();
m_sdbButtonsSizerOK = new wxButton( this, wxID_OK );
m_sdbButtonsSizer->AddButton( m_sdbButtonsSizerOK );
m_sdbButtonsSizerCancel = new wxButton( this, wxID_CANCEL );
m_sdbButtonsSizer->AddButton( m_sdbButtonsSizerCancel );
m_sdbButtonsSizer->Realize();
bMainSizer->Add( m_sdbButtonsSizer, 0, wxALL|wxALIGN_RIGHT, 5 );
this->SetSizer( bMainSizer );
this->Layout();
......@@ -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_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_sdbSizer1Cancel->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_sdbButtonsSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnCancelButtonClick ), 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()
......@@ -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_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_sdbSizer1Cancel->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_sdbButtonsSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnCancelButtonClick ), NULL, this );
m_sdbButtonsSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DESIGN_RULES_BASE::OnOkButtonClick ), NULL, this );
}
......@@ -942,7 +942,7 @@
<property name="Save">0</property>
<property name="Yes">0</property>
<property name="minimum_size"></property>
<property name="name">m_sdbSizer1</property>
<property name="name">m_sdbButtonsSizer</property>
<property name="permission">protected</property>
<event name="OnApplyButtonClick"></event>
<event name="OnCancelButtonClick">OnCancelButtonClick</event>
......
......@@ -57,9 +57,9 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog
wxChoice* m_rightClassChoice;
wxListCtrl* m_rightListCtrl;
wxHtmlWindow* m_MessagesList;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
wxStdDialogButtonSizer* m_sdbButtonsSizer;
wxButton* m_sdbButtonsSizerOK;
wxButton* m_sdbButtonsSizerCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnNetClassesNameLeftClick( wxGridEvent& event ){ event.Skip(); }
......
......@@ -81,9 +81,10 @@ void WinEDA_PcbFrame::Edit_TrackSegm_Width( wxDC* DC, TRACK* aTrackItem )
return; // No change
// The segment has changed: redraw it and save it in undo list
TRACK* oldsegm = (TRACK*) itemsListPicker.GetPickedItem( 0 );
if( DC )
{
TRACK* oldsegm = (TRACK*) itemsListPicker.GetPickedItemLink( 0 );
wxASSERT(oldsegm);
DrawPanel->CursorOff( DC ); // Erase cursor shape
oldsegm->Draw( DrawPanel, DC, GR_XOR ); // Erase old track shape
aTrackItem->Draw( DrawPanel, DC, GR_OR ); // Display new track shape
......
......@@ -163,20 +163,23 @@ bool WinEDA_PcbFrame::Clear_Pcb( bool aQuery )
// delete the old BOARD and create a new BOARD so that the default
// layer names are put into the BOARD.
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();
SetCurItem( NULL );
/* Init parametres de gestion */
/* Init new grid size */
wxRealPoint gridsize = GetScreen()->GetGrid();
GetScreen()->Init();
GetScreen()->SetGrid( gridsize );
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 );
return true;
......
......@@ -964,6 +964,7 @@ int WinEDA_PcbFrame::ReadPcbFile( FILE* File, bool Append )
board->SynchronizeNetsAndNetClasses( );
board->m_Status_Pcb = 0;
m_TrackAndViasSizesList_Changed = true;
SetToolbars();
return 1;
}
......
......@@ -223,7 +223,7 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
wxConfig* config = wxGetApp().m_EDA_Config;
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_SelTrackWidthBox = NULL;
m_SelViaSizeBox = NULL;
......@@ -231,6 +231,7 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
m_TrackAndViasSizesList_Changed = false;
SetBoard( new BOARD( NULL, this ) );
m_TrackAndViasSizesList_Changed = true;
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