Commit 5a50b968 authored by jean-pierre charras's avatar jean-pierre charras

Eeszchema: Minor fixes.

Code cleanup: remove m_Son member in EDA_ITEM which was never used.
parents 9546c59f cf7dbf6f
...@@ -67,7 +67,6 @@ EDA_ITEM::EDA_ITEM( const EDA_ITEM& base ) ...@@ -67,7 +67,6 @@ EDA_ITEM::EDA_ITEM( const EDA_ITEM& base )
InitVars(); InitVars();
m_StructType = base.m_StructType; m_StructType = base.m_StructType;
m_Parent = base.m_Parent; m_Parent = base.m_Parent;
m_Son = base.m_Son;
m_Flags = base.m_Flags; m_Flags = base.m_Flags;
// A copy of an item cannot have the same time stamp as the original item. // A copy of an item cannot have the same time stamp as the original item.
...@@ -82,7 +81,6 @@ void EDA_ITEM::InitVars() ...@@ -82,7 +81,6 @@ void EDA_ITEM::InitVars()
Pnext = NULL; // Linked list: Link (next struct) Pnext = NULL; // Linked list: Link (next struct)
Pback = NULL; // Linked list: Link (previous struct) Pback = NULL; // Linked list: Link (previous struct)
m_Parent = NULL; // Linked list: Link (parent struct) m_Parent = NULL; // Linked list: Link (parent struct)
m_Son = NULL; // Linked list: Link (son struct)
m_List = NULL; // I am not on any list yet m_List = NULL; // I am not on any list yet
m_Image = NULL; // Link to an image copy for undelete or abort command m_Image = NULL; // Link to an image copy for undelete or abort command
m_Flags = 0; // flags for editions and other m_Flags = 0; // flags for editions and other
...@@ -235,7 +233,6 @@ EDA_ITEM& EDA_ITEM::operator=( const EDA_ITEM& aItem ) ...@@ -235,7 +233,6 @@ EDA_ITEM& EDA_ITEM::operator=( const EDA_ITEM& aItem )
m_Image = aItem.m_Image; m_Image = aItem.m_Image;
m_StructType = aItem.m_StructType; m_StructType = aItem.m_StructType;
m_Parent = aItem.m_Parent; m_Parent = aItem.m_Parent;
m_Son = aItem.m_Son;
m_Flags = aItem.m_Flags; m_Flags = aItem.m_Flags;
m_TimeStamp = aItem.m_TimeStamp; m_TimeStamp = aItem.m_TimeStamp;
m_Status = aItem.m_Status; m_Status = aItem.m_Status;
......
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2008 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net> * Copyright (C) 2013 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -295,7 +295,7 @@ void DIALOG_LABEL_EDITOR::TextPropertiesAccept( wxCommandEvent& aEvent ) ...@@ -295,7 +295,7 @@ void DIALOG_LABEL_EDITOR::TextPropertiesAccept( wxCommandEvent& aEvent )
m_Parent->OnModify(); m_Parent->OnModify();
/* Make the text size as new default size if it is a new text */ // Make the text size the new default size ( if it is a new text ):
if( m_CurrentText->IsNew() ) if( m_CurrentText->IsNew() )
m_Parent->SetDefaultLabelSize( m_CurrentText->GetSize().x ); m_Parent->SetDefaultLabelSize( m_CurrentText->GetSize().x );
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012) // C++ code generated with wxFormBuilder (version Nov 6 2013)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -93,7 +93,7 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow ...@@ -93,7 +93,7 @@ DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_BASE( wxWindow* parent, wxWindow
wxString m_TextVJustificationOptChoices[] = { _("Align bottom"), _("Align center"), _("Align top") }; wxString m_TextVJustificationOptChoices[] = { _("Align bottom"), _("Align center"), _("Align top") };
int m_TextVJustificationOptNChoices = sizeof( m_TextVJustificationOptChoices ) / sizeof( wxString ); int m_TextVJustificationOptNChoices = sizeof( m_TextVJustificationOptChoices ) / sizeof( wxString );
m_TextVJustificationOpt = new wxRadioBox( this, wxID_ANY, _("Verticle Justify"), wxDefaultPosition, wxDefaultSize, m_TextVJustificationOptNChoices, m_TextVJustificationOptChoices, 1, wxRA_SPECIFY_COLS ); m_TextVJustificationOpt = new wxRadioBox( this, wxID_ANY, _("Vertical Justify"), wxDefaultPosition, wxDefaultSize, m_TextVJustificationOptNChoices, m_TextVJustificationOptChoices, 1, wxRA_SPECIFY_COLS );
m_TextVJustificationOpt->SetSelection( 1 ); m_TextVJustificationOpt->SetSelection( 1 );
bBottomtBoxSizer->Add( m_TextVJustificationOpt, 1, wxALL|wxEXPAND, 5 ); bBottomtBoxSizer->Add( m_TextVJustificationOpt, 1, wxALL|wxEXPAND, 5 );
......
...@@ -20,8 +20,10 @@ ...@@ -20,8 +20,10 @@
<property name="path">.</property> <property name="path">.</property>
<property name="precompiled_header"></property> <property name="precompiled_header"></property>
<property name="relative_path">1</property> <property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property> <property name="skip_php_events">1</property>
<property name="skip_python_events">1</property> <property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">1</property> <property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property> <property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1"> <object class="Dialog" expanded="1">
...@@ -1150,7 +1152,7 @@ ...@@ -1150,7 +1152,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Verticle Justify</property> <property name="label">Vertical Justify</property>
<property name="majorDimension">1</property> <property name="majorDimension">1</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012) // C++ code generated with wxFormBuilder (version Nov 6 2013)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
......
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2013 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
...@@ -105,7 +105,6 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* aDC, int aType ) ...@@ -105,7 +105,6 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* aDC, int aType )
textItem->SetSize( wxSize( GetDefaultLabelSize(), GetDefaultLabelSize() ) ); textItem->SetSize( wxSize( GetDefaultLabelSize(), GetDefaultLabelSize() ) );
textItem->SetFlags( IS_NEW | IS_MOVED ); textItem->SetFlags( IS_NEW | IS_MOVED );
textItem->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode );
EditSchematicText( textItem ); EditSchematicText( textItem );
if( textItem->GetText().IsEmpty() ) if( textItem->GetText().IsEmpty() )
...@@ -123,7 +122,8 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* aDC, int aType ) ...@@ -123,7 +122,8 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* aDC, int aType )
lastGlobalLabelShape = textItem->GetShape(); lastGlobalLabelShape = textItem->GetShape();
} }
textItem->Draw( m_canvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); // Prepare display to move the new item
textItem->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode );
MoveItem( (SCH_ITEM*) textItem, aDC ); MoveItem( (SCH_ITEM*) textItem, aDC );
return textItem; return textItem;
......
...@@ -202,7 +202,6 @@ void DuplicateItemsInList( SCH_SCREEN* screen, PICKED_ITEMS_LIST& aItemsList, ...@@ -202,7 +202,6 @@ void DuplicateItemsInList( SCH_SCREEN* screen, PICKED_ITEMS_LIST& aItemsList,
{ {
SCH_SHEET* sheet = (SCH_SHEET*) newitem; SCH_SHEET* sheet = (SCH_SHEET*) newitem;
sheet->SetTimeStamp( GetNewTimeStamp() ); sheet->SetTimeStamp( GetNewTimeStamp() );
sheet->SetSon( NULL );
break; break;
} }
......
...@@ -117,6 +117,8 @@ SCH_SHEET_PIN* SCH_EDIT_FRAME::CreateSheetPin( SCH_SHEET* aSheet, wxDC* aDC ) ...@@ -117,6 +117,8 @@ SCH_SHEET_PIN* SCH_EDIT_FRAME::CreateSheetPin( SCH_SHEET* aSheet, wxDC* aDC )
m_lastSheetPinType = sheetPin->GetShape(); m_lastSheetPinType = sheetPin->GetShape();
m_lastSheetPinTextSize = sheetPin->GetSize(); m_lastSheetPinTextSize = sheetPin->GetSize();
sheetPin->SetPosition( GetCrossHairPosition() );
sheetPin->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode );
MoveItem( (SCH_ITEM*) sheetPin, aDC ); MoveItem( (SCH_ITEM*) sheetPin, aDC );
OnModify(); OnModify();
...@@ -160,7 +162,9 @@ SCH_SHEET_PIN* SCH_EDIT_FRAME::ImportSheetPin( SCH_SHEET* aSheet, wxDC* aDC ) ...@@ -160,7 +162,9 @@ SCH_SHEET_PIN* SCH_EDIT_FRAME::ImportSheetPin( SCH_SHEET* aSheet, wxDC* aDC )
sheetPin->SetSize( m_lastSheetPinTextSize ); sheetPin->SetSize( m_lastSheetPinTextSize );
m_lastSheetPinType = label->GetShape(); m_lastSheetPinType = label->GetShape();
sheetPin->SetShape( label->GetShape() ); sheetPin->SetShape( label->GetShape() );
sheetPin->SetPosition( GetCrossHairPosition() );
sheetPin->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode );
MoveItem( (SCH_ITEM*) sheetPin, aDC ); MoveItem( (SCH_ITEM*) sheetPin, aDC );
return sheetPin; return sheetPin;
......
...@@ -346,8 +346,7 @@ protected: ...@@ -346,8 +346,7 @@ protected:
EDA_ITEM* Pback; ///< previous in linked list EDA_ITEM* Pback; ///< previous in linked list
DHEAD* m_List; ///< which DLIST I am on. DHEAD* m_List; ///< which DLIST I am on.
EDA_ITEM* m_Parent; /* Linked list: Link (parent struct) */ EDA_ITEM* m_Parent; ///< Linked list: Link (parent struct)
EDA_ITEM* m_Son; /* Linked list: Link (son struct) */
time_t m_TimeStamp; ///< Time stamp used for logical links time_t m_TimeStamp; ///< Time stamp used for logical links
/// Set to true to override the visibility setting of the item. /// Set to true to override the visibility setting of the item.
...@@ -379,13 +378,11 @@ public: ...@@ -379,13 +378,11 @@ public:
EDA_ITEM* Next() const { return (EDA_ITEM*) Pnext; } EDA_ITEM* Next() const { return (EDA_ITEM*) Pnext; }
EDA_ITEM* Back() const { return (EDA_ITEM*) Pback; } EDA_ITEM* Back() const { return (EDA_ITEM*) Pback; }
EDA_ITEM* GetParent() const { return m_Parent; } EDA_ITEM* GetParent() const { return m_Parent; }
EDA_ITEM* GetSon() const { return m_Son; }
DHEAD* GetList() const { return m_List; } DHEAD* GetList() const { return m_List; }
void SetNext( EDA_ITEM* aNext ) { Pnext = aNext; } void SetNext( EDA_ITEM* aNext ) { Pnext = aNext; }
void SetBack( EDA_ITEM* aBack ) { Pback = aBack; } void SetBack( EDA_ITEM* aBack ) { Pback = aBack; }
void SetParent( EDA_ITEM* aParent ) { m_Parent = aParent; } void SetParent( EDA_ITEM* aParent ) { m_Parent = aParent; }
void SetSon( EDA_ITEM* aSon ) { m_Son = aSon; }
void SetList( DHEAD* aList ) { m_List = aList; } void SetList( DHEAD* aList ) { m_List = aList; }
inline bool IsNew() const { return m_Flags & IS_NEW; } inline bool IsNew() const { return m_Flags & IS_NEW; }
......
...@@ -277,7 +277,7 @@ void SwapData( BOARD_ITEM* aItem, BOARD_ITEM* aImage ) ...@@ -277,7 +277,7 @@ void SwapData( BOARD_ITEM* aItem, BOARD_ITEM* aImage )
break; break;
case PCB_TARGET_T: case PCB_TARGET_T:
( (PCB_TARGET*) aItem )->Exchg( (PCB_TARGET*) aImage ); std::swap( *((PCB_TARGET*)aItem), *((PCB_TARGET*)aImage) );
break; break;
case PCB_DIMENSION_T: case PCB_DIMENSION_T:
......
...@@ -71,16 +71,6 @@ PCB_TARGET::~PCB_TARGET() ...@@ -71,16 +71,6 @@ PCB_TARGET::~PCB_TARGET()
{ {
} }
void PCB_TARGET::Exchg( PCB_TARGET* source )
{
EXCHG( m_Pos, source->m_Pos );
EXCHG( m_Width, source->m_Width );
EXCHG( m_Size, source->m_Size );
EXCHG( m_Shape, source->m_Shape );
}
void PCB_TARGET::Copy( PCB_TARGET* source ) void PCB_TARGET::Copy( PCB_TARGET* source )
{ {
m_Layer = source->m_Layer; m_Layer = source->m_Layer;
......
...@@ -71,12 +71,6 @@ public: ...@@ -71,12 +71,6 @@ public:
void SetWidth( int aWidth ) { m_Width = aWidth; } void SetWidth( int aWidth ) { m_Width = aWidth; }
int GetWidth() const { return m_Width; } int GetWidth() const { return m_Width; }
/**
* Function Exchg
* swaps data with another PCB_TARGET for use by undo-redo.
*/
void Exchg( PCB_TARGET* aTarget );
void Move( const wxPoint& aMoveVector ) void Move( const wxPoint& aMoveVector )
{ {
m_Pos += aMoveVector; m_Pos += aMoveVector;
......
/**************************************/ /**
/* dialog_graphic_item_properties.cpp */ * @file dialog_graphic_item_properties.cpp
/**************************************/ */
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* Edit parameters values of graphic items type DRAWSEGMENTS: /* Edit parameters values of graphic items type DRAWSEGMENTS:
* Lines * Lines
...@@ -41,7 +63,7 @@ public: ...@@ -41,7 +63,7 @@ public:
private: private:
void initDlg( ); void initDlg( );
void OnOkClick( wxCommandEvent& event ); void OnOkClick( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
void OnLayerChoice( wxCommandEvent& event ); void OnLayerChoice( wxCommandEvent& event );
}; };
...@@ -71,9 +93,8 @@ void PCB_EDIT_FRAME::InstallGraphicItemPropertiesDialog(DRAWSEGMENT * aItem, wxD ...@@ -71,9 +93,8 @@ void PCB_EDIT_FRAME::InstallGraphicItemPropertiesDialog(DRAWSEGMENT * aItem, wxD
} }
m_canvas->SetIgnoreMouseEvents( true ); m_canvas->SetIgnoreMouseEvents( true );
DIALOG_GRAPHIC_ITEM_PROPERTIES* dialog = new DIALOG_GRAPHIC_ITEM_PROPERTIES( this, aItem, aDC ); DIALOG_GRAPHIC_ITEM_PROPERTIES dlg( this, aItem, aDC );
dialog->ShowModal(); dlg.ShowModal();
dialog->Destroy();
m_canvas->MoveCursorToCrossHair(); m_canvas->MoveCursorToCrossHair();
m_canvas->SetIgnoreMouseEvents( false ); m_canvas->SetIgnoreMouseEvents( false );
} }
...@@ -85,7 +106,6 @@ void DIALOG_GRAPHIC_ITEM_PROPERTIES::initDlg( ) ...@@ -85,7 +106,6 @@ void DIALOG_GRAPHIC_ITEM_PROPERTIES::initDlg( )
* according to the item parameters values * according to the item parameters values
*/ */
{ {
SetFocus();
m_StandardButtonsSizerOK->SetDefault(); m_StandardButtonsSizerOK->SetDefault();
// Set unit symbol // Set unit symbol
...@@ -246,9 +266,3 @@ void DIALOG_GRAPHIC_ITEM_PROPERTIES::OnOkClick( wxCommandEvent& event ) ...@@ -246,9 +266,3 @@ void DIALOG_GRAPHIC_ITEM_PROPERTIES::OnOkClick( wxCommandEvent& event )
Close( true ); Close( true );
} }
void DIALOG_GRAPHIC_ITEM_PROPERTIES::OnCancelClick( wxCommandEvent& event )
{
event.Skip();
}
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012) // C++ code generated with wxFormBuilder (version Nov 6 2013)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -27,38 +27,38 @@ TARGET_PROPERTIES_DIALOG_EDITOR_BASE::TARGET_PROPERTIES_DIALOG_EDITOR_BASE( wxWi ...@@ -27,38 +27,38 @@ TARGET_PROPERTIES_DIALOG_EDITOR_BASE::TARGET_PROPERTIES_DIALOG_EDITOR_BASE( wxWi
m_staticTextSize = new wxStaticText( this, wxID_ANY, wxT("Size"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextSize = new wxStaticText( this, wxID_ANY, wxT("Size"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSize->Wrap( -1 ); m_staticTextSize->Wrap( -1 );
fgSizer->Add( m_staticTextSize, 0, wxALL, 5 ); fgSizer->Add( m_staticTextSize, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_MireWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_TargetSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer->Add( m_MireWidthCtrl, 0, wxALL|wxEXPAND, 5 ); fgSizer->Add( m_TargetSizeCtrl, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_staticTextSizeUnits = new wxStaticText( this, wxID_ANY, wxT("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextSizeUnits = new wxStaticText( this, wxID_ANY, wxT("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSizeUnits->Wrap( -1 ); m_staticTextSizeUnits->Wrap( -1 );
fgSizer->Add( m_staticTextSizeUnits, 0, wxALL, 5 ); fgSizer->Add( m_staticTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
m_staticTextThickness = new wxStaticText( this, wxID_ANY, wxT("Thickness"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextThickness = new wxStaticText( this, wxID_ANY, wxT("Thickness"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextThickness->Wrap( -1 ); m_staticTextThickness->Wrap( -1 );
fgSizer->Add( m_staticTextThickness, 0, wxALL, 5 ); fgSizer->Add( m_staticTextThickness, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_MireSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_TargetThicknessCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer->Add( m_MireSizeCtrl, 0, wxALL|wxEXPAND, 5 ); fgSizer->Add( m_TargetThicknessCtrl, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_staticTextThicknessUnits = new wxStaticText( this, wxID_ANY, wxT("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextThicknessUnits = new wxStaticText( this, wxID_ANY, wxT("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextThicknessUnits->Wrap( -1 ); m_staticTextThicknessUnits->Wrap( -1 );
fgSizer->Add( m_staticTextThicknessUnits, 0, wxALL, 5 ); fgSizer->Add( m_staticTextThicknessUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
m_staticTextShape = new wxStaticText( this, wxID_ANY, wxT("Shape"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextShape = new wxStaticText( this, wxID_ANY, wxT("Shape"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextShape->Wrap( -1 ); m_staticTextShape->Wrap( -1 );
fgSizer->Add( m_staticTextShape, 0, wxALL, 5 ); fgSizer->Add( m_staticTextShape, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
wxString m_MireShapeChoices[] = { wxT("+"), wxT("X") }; wxString m_TargetShapeChoices[] = { wxT("+"), wxT("X") };
int m_MireShapeNChoices = sizeof( m_MireShapeChoices ) / sizeof( wxString ); int m_TargetShapeNChoices = sizeof( m_TargetShapeChoices ) / sizeof( wxString );
m_MireShape = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_MireShapeNChoices, m_MireShapeChoices, 0 ); m_TargetShape = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_TargetShapeNChoices, m_TargetShapeChoices, 0 );
m_MireShape->SetSelection( 0 ); m_TargetShape->SetSelection( 0 );
fgSizer->Add( m_MireShape, 0, wxALL|wxEXPAND, 5 ); fgSizer->Add( m_TargetShape, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
fgSizer->Add( 0, 0, 1, wxEXPAND, 5 ); fgSizer->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
bSizerUpper->Add( fgSizer, 1, wxEXPAND, 5 ); bSizerUpper->Add( fgSizer, 1, wxEXPAND, 5 );
...@@ -66,8 +66,8 @@ TARGET_PROPERTIES_DIALOG_EDITOR_BASE::TARGET_PROPERTIES_DIALOG_EDITOR_BASE( wxWi ...@@ -66,8 +66,8 @@ TARGET_PROPERTIES_DIALOG_EDITOR_BASE::TARGET_PROPERTIES_DIALOG_EDITOR_BASE( wxWi
bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 ); bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); bSizerMain->Add( m_staticline, 0, wxEXPAND | wxALL, 5 );
m_sdbSizerButts = new wxStdDialogButtonSizer(); m_sdbSizerButts = new wxStdDialogButtonSizer();
m_sdbSizerButtsOK = new wxButton( this, wxID_OK ); m_sdbSizerButtsOK = new wxButton( this, wxID_OK );
......
...@@ -20,8 +20,10 @@ ...@@ -20,8 +20,10 @@
<property name="path">.</property> <property name="path">.</property>
<property name="precompiled_header"></property> <property name="precompiled_header"></property>
<property name="relative_path">1</property> <property name="relative_path">1</property>
<property name="skip_lua_events">1</property>
<property name="skip_php_events">1</property> <property name="skip_php_events">1</property>
<property name="skip_python_events">1</property> <property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_enum">0</property> <property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property> <property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1"> <object class="Dialog" expanded="1">
...@@ -118,7 +120,7 @@ ...@@ -118,7 +120,7 @@
<property name="vgap">0</property> <property name="vgap">0</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -201,7 +203,7 @@ ...@@ -201,7 +203,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1"> <object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -239,7 +241,7 @@ ...@@ -239,7 +241,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_MireWidthCtrl</property> <property name="name">m_TargetSizeCtrl</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
...@@ -292,7 +294,7 @@ ...@@ -292,7 +294,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -375,7 +377,7 @@ ...@@ -375,7 +377,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -458,7 +460,7 @@ ...@@ -458,7 +460,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxTextCtrl" expanded="1"> <object class="wxTextCtrl" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -496,7 +498,7 @@ ...@@ -496,7 +498,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_MireSizeCtrl</property> <property name="name">m_TargetThicknessCtrl</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
...@@ -549,7 +551,7 @@ ...@@ -549,7 +551,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -632,7 +634,7 @@ ...@@ -632,7 +634,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -715,7 +717,7 @@ ...@@ -715,7 +717,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxChoice" expanded="1"> <object class="wxChoice" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
...@@ -753,7 +755,7 @@ ...@@ -753,7 +755,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_MireShape</property> <property name="name">m_TargetShape</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
...@@ -803,7 +805,7 @@ ...@@ -803,7 +805,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="spacer" expanded="1"> <object class="spacer" expanded="1">
<property name="height">0</property> <property name="height">0</property>
...@@ -854,7 +856,7 @@ ...@@ -854,7 +856,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_staticline1</property> <property name="name">m_staticline</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 8 2012) // C++ code generated with wxFormBuilder (version Nov 6 2013)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -38,14 +38,14 @@ class TARGET_PROPERTIES_DIALOG_EDITOR_BASE : public DIALOG_SHIM ...@@ -38,14 +38,14 @@ class TARGET_PROPERTIES_DIALOG_EDITOR_BASE : public DIALOG_SHIM
protected: protected:
wxStaticText* m_staticTextSize; wxStaticText* m_staticTextSize;
wxTextCtrl* m_MireWidthCtrl; wxTextCtrl* m_TargetSizeCtrl;
wxStaticText* m_staticTextSizeUnits; wxStaticText* m_staticTextSizeUnits;
wxStaticText* m_staticTextThickness; wxStaticText* m_staticTextThickness;
wxTextCtrl* m_MireSizeCtrl; wxTextCtrl* m_TargetThicknessCtrl;
wxStaticText* m_staticTextThicknessUnits; wxStaticText* m_staticTextThicknessUnits;
wxStaticText* m_staticTextShape; wxStaticText* m_staticTextShape;
wxChoice* m_MireShape; wxChoice* m_TargetShape;
wxStaticLine* m_staticline1; wxStaticLine* m_staticline;
wxStdDialogButtonSizer* m_sdbSizerButts; wxStdDialogButtonSizer* m_sdbSizerButts;
wxButton* m_sdbSizerButtsOK; wxButton* m_sdbSizerButtsOK;
wxButton* m_sdbSizerButtsCancel; wxButton* m_sdbSizerButtsCancel;
......
...@@ -100,14 +100,14 @@ TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR( PCB_EDIT_FRAME ...@@ -100,14 +100,14 @@ TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR( PCB_EDIT_FRAME
// Size: // Size:
m_staticTextSizeUnits->SetLabel( GetUnitsLabel( g_UserUnit ) ); m_staticTextSizeUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_MireSizeCtrl->SetValue( ReturnStringFromValue( g_UserUnit, m_Target->GetSize() ) ); m_TargetSizeCtrl->SetValue( ReturnStringFromValue( g_UserUnit, m_Target->GetSize() ) );
// Thickness: // Thickness:
m_staticTextThicknessUnits->SetLabel( GetUnitsLabel( g_UserUnit ) ); m_staticTextThicknessUnits->SetLabel( GetUnitsLabel( g_UserUnit ) );
m_MireWidthCtrl->SetValue( ReturnStringFromValue( g_UserUnit, m_Target->GetWidth() ) ); m_TargetThicknessCtrl->SetValue( ReturnStringFromValue( g_UserUnit, m_Target->GetWidth() ) );
// Shape // Shape
m_MireShape->SetSelection( m_Target->GetShape() ? 1 : 0 ); m_TargetShape->SetSelection( m_Target->GetShape() ? 1 : 0 );
GetSizer()->Fit( this ); GetSizer()->Fit( this );
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
...@@ -135,13 +135,13 @@ void TARGET_PROPERTIES_DIALOG_EDITOR::OnOkClick( wxCommandEvent& event ) ...@@ -135,13 +135,13 @@ void TARGET_PROPERTIES_DIALOG_EDITOR::OnOkClick( wxCommandEvent& event )
m_Target->SetFlags( IN_EDIT ); // set flag in edit to force m_Target->SetFlags( IN_EDIT ); // set flag in edit to force
// undo/redo/abort proper operation // undo/redo/abort proper operation
int tmp = ReturnValueFromString( g_UserUnit, m_MireWidthCtrl->GetValue() ); int tmp = ReturnValueFromString( g_UserUnit, m_TargetThicknessCtrl->GetValue() );
m_Target->SetWidth( tmp ); m_Target->SetWidth( tmp );
MireDefaultSize = ReturnValueFromString( g_UserUnit, m_MireSizeCtrl->GetValue() ); MireDefaultSize = ReturnValueFromString( g_UserUnit, m_TargetSizeCtrl->GetValue() );
m_Target->SetSize( MireDefaultSize ); m_Target->SetSize( MireDefaultSize );
m_Target->SetShape( m_MireShape->GetSelection() ? 1 : 0 ); m_Target->SetShape( m_TargetShape->GetSelection() ? 1 : 0 );
m_Target->Draw( m_Parent->GetCanvas(), m_DC, ( m_Target->IsMoving() ) ? GR_XOR : GR_OR ); m_Target->Draw( m_Parent->GetCanvas(), m_DC, ( m_Target->IsMoving() ) ? GR_XOR : GR_OR );
......
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