Commit a0c5e040 authored by charras's avatar charras

Minor changes

parent 3db5876c
......@@ -15,6 +15,19 @@ email address.
for it.
2009-oct-30 UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
Replace library editor pin properties dialog box and minor update.
* Replaced library pin properties dialog with wxFormBuilder version.
* Remove DialogBlocks version of pin properties dialog.
* Add pin properties dialog support code to pin object.
* Create single event handler for displaying pin properties dialog.
* Remove left over DialogBlocks project file for annotate dialog.
* Fixed escape key bug in library editor new component dialog.
* Add GetUnitsLabel() to get human readable units for dialog labels.
* Translate French comments in all modified files.
* Some minor clean up of Doxygen comments.
2009-oct-30 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++pcbnew
......
......@@ -166,6 +166,7 @@ void DialogLabelEditor::onEnterKey( wxCommandEvent& event )
void DialogLabelEditor::OnButtonOKClick( wxCommandEvent& event )
{
TextPropertiesAccept( event );
EndModal( wxID_OK );
}
......@@ -176,6 +177,6 @@ void DialogLabelEditor::OnButtonOKClick( wxCommandEvent& event )
void DialogLabelEditor::OnButtonCANCEL_Click( wxCommandEvent& event )
{
m_Parent->DrawPanel->MouseToCursorSchema();
EndModal( -1 );
EndModal( wxID_CANCEL );
}
......@@ -139,11 +139,14 @@ void WinEDA_SchematicFrame::EditSchematicText( SCH_TEXT* TextStruct,
if( TextStruct == NULL )
return;
// Erase old text on screen
DrawPanel->CursorOff( DC );
RedrawOneStruct( DrawPanel, DC, TextStruct, g_XorMode );
DialogLabelEditor::ShowModally( this, TextStruct );
// Redraw nex text, if exists
if( ! TextStruct->m_Text.IsEmpty() )
RedrawOneStruct( DrawPanel, DC, TextStruct, GR_DEFAULT_DRAWMODE );
DrawPanel->CursorOn( DC );
}
......@@ -163,11 +166,11 @@ void WinEDA_SchematicFrame::ChangeTextOrient( SCH_TEXT* TextStruct, wxDC* DC )
if( TextStruct->m_Flags == 0 )
SaveCopyInUndoList( TextStruct, UR_CHANGED );
/* Effacement du texte en cours */
/* Erase old text */
DrawPanel->CursorOff( DC );
RedrawOneStruct( DrawPanel, DC, TextStruct, g_XorMode );
/* Rotation du texte */
/* Rot text */
int orient;
switch( TextStruct->Type() )
......@@ -187,7 +190,7 @@ void WinEDA_SchematicFrame::ChangeTextOrient( SCH_TEXT* TextStruct, wxDC* DC )
GetScreen()->SetModify();
/* Reaffichage */
/* redraw the new tewt */
RedrawOneStruct( DrawPanel, DC, TextStruct, g_XorMode );
DrawPanel->CursorOn( DC );
}
......
No preview for this file type
This diff is collapsed.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 29 2008)
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -152,7 +152,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_panelNetClassesEditor->SetSizer( bpanelNetClassesSizer );
m_panelNetClassesEditor->Layout();
bpanelNetClassesSizer->Fit( m_panelNetClassesEditor );
m_DRnotebook->AddPage( m_panelNetClassesEditor, _("Net Classes Editor"), true );
m_DRnotebook->AddPage( m_panelNetClassesEditor, _("Net Classes Editor"), false );
m_panelGolbalDesignRules = new wxPanel( m_DRnotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
wxBoxSizer* bpanelGlobRulesSizer;
bpanelGlobRulesSizer = new wxBoxSizer( wxVERTICAL );
......@@ -267,7 +267,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
wxStaticBoxSizer* sViaSizeBox;
sViaSizeBox = new wxStaticBoxSizer( new wxStaticBox( m_panelGolbalDesignRules, wxID_ANY, _("Custom Via Sizes:") ), wxVERTICAL );
m_staticText7 = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("A blank or 0 => default Netclass value"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText7 = new wxStaticText( m_panelGolbalDesignRules, wxID_ANY, _("Drill value: a blank or 0 => default Netclass value"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText7->Wrap( -1 );
sViaSizeBox->Add( m_staticText7, 0, wxALL, 5 );
......@@ -356,7 +356,7 @@ DIALOG_DESIGN_RULES_BASE::DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID
m_panelGolbalDesignRules->SetSizer( bpanelGlobRulesSizer );
m_panelGolbalDesignRules->Layout();
bpanelGlobRulesSizer->Fit( m_panelGolbalDesignRules );
m_DRnotebook->AddPage( m_panelGolbalDesignRules, _("Global Design Rules"), false );
m_DRnotebook->AddPage( m_panelGolbalDesignRules, _("Global Design Rules"), true );
bMainSizer->Add( m_DRnotebook, 1, wxEXPAND | wxALL, 5 );
......
......@@ -32,7 +32,7 @@
<property name="minimum_size">-1,-1</property>
<property name="name">DIALOG_DESIGN_RULES_BASE</property>
<property name="pos"></property>
<property name="size">900,600</property>
<property name="size">900,640</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property>
<property name="title">Design Rules Editor</property>
......@@ -128,7 +128,7 @@
<object class="notebookpage" expanded="1">
<property name="bitmap"></property>
<property name="label">Net Classes Editor</property>
<property name="select">1</property>
<property name="select">0</property>
<object class="wxPanel" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
......@@ -969,7 +969,7 @@
<object class="notebookpage" expanded="1">
<property name="bitmap"></property>
<property name="label">Global Design Rules</property>
<property name="select">0</property>
<property name="select">1</property>
<object class="wxPanel" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
......@@ -1895,7 +1895,7 @@
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">A blank or 0 =&gt; default Netclass value</property>
<property name="label">Drill value: a blank or 0 =&gt; default Netclass value</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_staticText7</property>
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 29 2008)
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -108,7 +108,7 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog
public:
DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Design Rules Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 900,600 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Design Rules Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 900,640 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_DESIGN_RULES_BASE();
};
......
......@@ -56,10 +56,10 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit()
}
// Enable/disable the option "copy current to net" if we ause only default netclass values
if( ! board->m_TrackWidthSelector && !board->m_ViaSizeSelector )
if( !board->m_TrackWidthSelector && !board->m_ViaSizeSelector )
{
m_Net2CurrValueButton->Enable(false);
m_Net2CurrValueText->Enable(false);
m_Net2CurrValueButton->Enable( false );
m_Net2CurrValueText->Enable( false );
}
// Display current values, and current netclass values:
......@@ -74,6 +74,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit()
else
msg = _( "Default" );
m_gridDisplayCurrentSettings->SetCellValue( 1, 0, msg );
// recompute the column widths here, after setting texts
value = netclass->GetViaDiameter();
......@@ -127,7 +128,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::MyInit()
m_gridDisplayCurrentSettings->SetReadOnly( ii, jj, true );
}
m_gridDisplayCurrentSettings->Fit( );
m_gridDisplayCurrentSettings->Fit();
}
......@@ -136,22 +137,55 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::OnOkClick( wxCommandEvent& event )
/*******************************************************************/
{
bool change = false;
switch( event.GetId() )
{
case ID_CURRENT_VALUES_TO_CURRENT_NET:
if( !IsOK( this,
_( "Set current Net tracks and vias sizes and drill to the current values?" ) ) )
return;
{
wxBusyCursor dummy;
change = m_Parent->Change_Net_Tracks_And_Vias_Sizes( m_Netcode, false );
}
break;
case ID_NETCLASS_VALUES_TO_CURRENT_NET:
if( !IsOK( this,
_(
"Set current Net tracks and vias sizes and drill to the Netclass default value?" ) ) )
return;
{
wxBusyCursor dummy;
change = m_Parent->Change_Net_Tracks_And_Vias_Sizes( m_Netcode, true );
}
break;
case ID_ALL_TRACKS_VIAS:
if( !IsOK( this, _( "Set All Tracks and Vias to Netclass value" ) ) )
return;
{
wxBusyCursor dummy;
change = m_Parent->Reset_All_Tracks_And_Vias_To_Netclass_Values( true, true );
}
break;
case ID_ALL_VIAS:
if( !IsOK( this, _( "Set All Via to Netclass value" ) ) )
return;
{
wxBusyCursor dummy;
change = m_Parent->Reset_All_Tracks_And_Vias_To_Netclass_Values( false, true );
}
break;
case ID_ALL_TRACKS:
if( !IsOK( this, _( "Set All Track to Netclass value" ) ) )
return;
{
wxBusyCursor dummy;
change = m_Parent->Reset_All_Tracks_And_Vias_To_Netclass_Values( true, false );
}
break;
}
......
......@@ -186,24 +186,6 @@ bool WinEDA_PcbFrame::Change_Net_Tracks_And_Vias_Sizes(
if( aNetcode <= 0 )
return false;
NETINFO_ITEM* net = GetBoard()->FindNet( aNetcode );
wxASSERT( net );
wxString netName = net->GetNetname();
wxString msg;
NETCLASS* netClass = net->GetNetClass();
wxASSERT( netClass );
wxString netClassName = netClass->GetName();
if( aUseNetclassValue )
msg.Printf( _(
"Set tracks and vias sizes and drill to the Netclass \"%s\"default value (entire NET \"%s\") ?" ),
GetChars( netClassName ), GetChars( netName ) );
else
msg.Printf( _(
"Set tracks and vias sizes and drill to the current values (entire NET \"%s\") ?" ),
GetChars( netClassName ), GetChars( netName ) );
if( !IsOK( this, msg ) )
return false;
/* Examine segments */
PICKED_ITEMS_LIST itemsListPicker;
bool change = false;
......@@ -232,22 +214,6 @@ bool WinEDA_PcbFrame::Reset_All_Tracks_And_Vias_To_Netclass_Values(
{
TRACK* pt_segm;
if( aTrack && aVia )
{
if( !IsOK( this, _( "Set All Tracks and Vias to Netclass value" ) ) )
return false;
}
else if( aVia )
{
if( !IsOK( this, _( "Set All Via to Netclass value" ) ) )
return false;
}
else if( aTrack )
{
if( !IsOK( this, _( "Set All Track to Netclass value" ) ) )
return false;
}
/* read and edit tracks and vias if required */
PICKED_ITEMS_LIST itemsListPicker;
bool change = false;
......
This diff is collapsed.
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