Pcbnew: make OK button default item in dimension properties dialog.
This commit is contained in:
parent
6a6a55f9bf
commit
e9ed3e3e55
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Oct 8 2012)
|
// C++ code generated with wxFormBuilder (version Jun 5 2014)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
@ -18,7 +18,7 @@ DIALOG_DIMENSION_EDITOR_BASE::DIALOG_DIMENSION_EDITOR_BASE( wxWindow* parent, wx
|
||||||
wxBoxSizer* bSizerMain;
|
wxBoxSizer* bSizerMain;
|
||||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_staticTextDim = new wxStaticText( this, wxID_ANY, _("Text:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticTextDim = new wxStaticText( this, wxID_ANY, _("Text"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticTextDim->Wrap( -1 );
|
m_staticTextDim->Wrap( -1 );
|
||||||
bSizerMain->Add( m_staticTextDim, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
bSizerMain->Add( m_staticTextDim, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ DIALOG_DIMENSION_EDITOR_BASE::DIALOG_DIMENSION_EDITOR_BASE( wxWindow* parent, wx
|
||||||
wxBoxSizer* bSizerLeft;
|
wxBoxSizer* bSizerLeft;
|
||||||
bSizerLeft = new wxBoxSizer( wxVERTICAL );
|
bSizerLeft = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_staticTextSizeX = new wxStaticText( this, wxID_ANY, _("Size X"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticTextSizeX = new wxStaticText( this, wxID_ANY, _("Text Width"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticTextSizeX->Wrap( -1 );
|
m_staticTextSizeX->Wrap( -1 );
|
||||||
bSizerLeft->Add( m_staticTextSizeX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
bSizerLeft->Add( m_staticTextSizeX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ DIALOG_DIMENSION_EDITOR_BASE::DIALOG_DIMENSION_EDITOR_BASE( wxWindow* parent, wx
|
||||||
m_TxtSizeXCtrl->SetMaxLength( 0 );
|
m_TxtSizeXCtrl->SetMaxLength( 0 );
|
||||||
bSizerLeft->Add( m_TxtSizeXCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
bSizerLeft->Add( m_TxtSizeXCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||||
|
|
||||||
m_staticTextSizeY = new wxStaticText( this, wxID_ANY, _("Size Y"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticTextSizeY = new wxStaticText( this, wxID_ANY, _("Text Height"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticTextSizeY->Wrap( -1 );
|
m_staticTextSizeY->Wrap( -1 );
|
||||||
bSizerLeft->Add( m_staticTextSizeY, 0, wxRIGHT|wxLEFT, 5 );
|
bSizerLeft->Add( m_staticTextSizeY, 0, wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ DIALOG_DIMENSION_EDITOR_BASE::DIALOG_DIMENSION_EDITOR_BASE( wxWindow* parent, wx
|
||||||
m_TxtSizeYCtrl->SetMaxLength( 0 );
|
m_TxtSizeYCtrl->SetMaxLength( 0 );
|
||||||
bSizerLeft->Add( m_TxtSizeYCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
bSizerLeft->Add( m_TxtSizeYCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||||
|
|
||||||
m_staticTextWidth = new wxStaticText( this, wxID_ANY, _("Width"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticTextWidth = new wxStaticText( this, wxID_ANY, _("Text Thickness"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticTextWidth->Wrap( -1 );
|
m_staticTextWidth->Wrap( -1 );
|
||||||
bSizerLeft->Add( m_staticTextWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
bSizerLeft->Add( m_staticTextWidth, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ DIALOG_DIMENSION_EDITOR_BASE::DIALOG_DIMENSION_EDITOR_BASE( wxWindow* parent, wx
|
||||||
m_TxtWidthCtrl->SetMaxLength( 0 );
|
m_TxtWidthCtrl->SetMaxLength( 0 );
|
||||||
bSizerLeft->Add( m_TxtWidthCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
bSizerLeft->Add( m_TxtWidthCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||||
|
|
||||||
m_staticTextPosX = new wxStaticText( this, wxID_ANY, _("Text position X"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticTextPosX = new wxStaticText( this, wxID_ANY, _("Text Position X"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticTextPosX->Wrap( -1 );
|
m_staticTextPosX->Wrap( -1 );
|
||||||
bSizerLeft->Add( m_staticTextPosX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
bSizerLeft->Add( m_staticTextPosX, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ DIALOG_DIMENSION_EDITOR_BASE::DIALOG_DIMENSION_EDITOR_BASE( wxWindow* parent, wx
|
||||||
m_textCtrlPosX->SetMaxLength( 0 );
|
m_textCtrlPosX->SetMaxLength( 0 );
|
||||||
bSizerLeft->Add( m_textCtrlPosX, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
bSizerLeft->Add( m_textCtrlPosX, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||||
|
|
||||||
m_staticTextPosY = new wxStaticText( this, wxID_ANY, _("Text position Y"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticTextPosY = new wxStaticText( this, wxID_ANY, _("Text Position Y"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticTextPosY->Wrap( -1 );
|
m_staticTextPosY->Wrap( -1 );
|
||||||
bSizerLeft->Add( m_staticTextPosY, 0, wxRIGHT|wxLEFT, 5 );
|
bSizerLeft->Add( m_staticTextPosY, 0, wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ DIALOG_DIMENSION_EDITOR_BASE::DIALOG_DIMENSION_EDITOR_BASE( wxWindow* parent, wx
|
||||||
m_rbMirror->SetSelection( 0 );
|
m_rbMirror->SetSelection( 0 );
|
||||||
bSizerRight->Add( m_rbMirror, 0, wxALL|wxEXPAND, 5 );
|
bSizerRight->Add( m_rbMirror, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
m_staticTextLayer = new wxStaticText( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_staticTextLayer = new wxStaticText( this, wxID_ANY, _("Layer"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticTextLayer->Wrap( -1 );
|
m_staticTextLayer->Wrap( -1 );
|
||||||
bSizerRight->Add( m_staticTextLayer, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
bSizerRight->Add( m_staticTextLayer, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ DIALOG_DIMENSION_EDITOR_BASE::DIALOG_DIMENSION_EDITOR_BASE( wxWindow* parent, wx
|
||||||
bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
|
bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
bSizerMain->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
|
bSizerMain->Add( m_staticline1, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
||||||
|
|
||||||
m_sdbSizerBts = new wxStdDialogButtonSizer();
|
m_sdbSizerBts = new wxStdDialogButtonSizer();
|
||||||
m_sdbSizerBtsOK = new wxButton( this, wxID_OK );
|
m_sdbSizerBtsOK = new wxButton( this, wxID_OK );
|
||||||
|
@ -109,11 +109,12 @@ DIALOG_DIMENSION_EDITOR_BASE::DIALOG_DIMENSION_EDITOR_BASE( wxWindow* parent, wx
|
||||||
m_sdbSizerBts->AddButton( m_sdbSizerBtsCancel );
|
m_sdbSizerBts->AddButton( m_sdbSizerBtsCancel );
|
||||||
m_sdbSizerBts->Realize();
|
m_sdbSizerBts->Realize();
|
||||||
|
|
||||||
bSizerMain->Add( m_sdbSizerBts, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
bSizerMain->Add( m_sdbSizerBts, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
this->SetSizer( bSizerMain );
|
this->SetSizer( bSizerMain );
|
||||||
this->Layout();
|
this->Layout();
|
||||||
|
bSizerMain->Fit( this );
|
||||||
|
|
||||||
this->Centre( wxBOTH );
|
this->Centre( wxBOTH );
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||||
<wxFormBuilder_Project>
|
<wxFormBuilder_Project>
|
||||||
<FileVersion major="1" minor="11" />
|
<FileVersion major="1" minor="13" />
|
||||||
<object class="Project" expanded="1">
|
<object class="Project" expanded="1">
|
||||||
<property name="class_decoration"></property>
|
<property name="class_decoration"></property>
|
||||||
<property name="code_generation">C++</property>
|
<property name="code_generation">C++</property>
|
||||||
|
@ -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">
|
||||||
|
@ -42,7 +44,7 @@
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">DIALOG_DIMENSION_EDITOR_BASE</property>
|
<property name="name">DIALOG_DIMENSION_EDITOR_BASE</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="size">417,328</property>
|
<property name="size">-1,-1</property>
|
||||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||||
<property name="title">Dimension Properties</property>
|
<property name="title">Dimension Properties</property>
|
||||||
|
@ -123,7 +125,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">Text:</property>
|
<property name="label">Text</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -315,7 +317,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">Size X</property>
|
<property name="label">Text Width</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -489,7 +491,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">Size Y</property>
|
<property name="label">Text Height</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -663,7 +665,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">Width</property>
|
<property name="label">Text Thickness</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -837,7 +839,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">Text position X</property>
|
<property name="label">Text Position X</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -1011,7 +1013,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">Text position Y</property>
|
<property name="label">Text Position Y</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -1286,7 +1288,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">Layer:</property>
|
<property name="label">Layer</property>
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
|
@ -1434,7 +1436,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 | wxALL</property>
|
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT|wxTOP</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticLine" expanded="1">
|
<object class="wxStaticLine" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
@ -1515,7 +1517,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|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
<property name="flag">wxALL|wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStdDialogButtonSizer" expanded="1">
|
<object class="wxStdDialogButtonSizer" expanded="1">
|
||||||
<property name="Apply">0</property>
|
<property name="Apply">0</property>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version Oct 8 2012)
|
// C++ code generated with wxFormBuilder (version Jun 5 2014)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||||
|
@ -67,7 +67,7 @@ class DIALOG_DIMENSION_EDITOR_BASE : public DIALOG_SHIM
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
DIALOG_DIMENSION_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Dimension Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 417,328 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
DIALOG_DIMENSION_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Dimension Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
~DIALOG_DIMENSION_EDITOR_BASE();
|
~DIALOG_DIMENSION_EDITOR_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
/* Local functions */
|
/* Local functions */
|
||||||
static void BuildDimension( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
|
static void BuildDimension( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
|
||||||
const wxPoint& aPosition, bool aErase );
|
const wxPoint& aPosition, bool aErase );
|
||||||
|
|
||||||
static void MoveDimensionText( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
|
static void MoveDimensionText( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
|
||||||
const wxPoint& aPosition, bool aErase );
|
const wxPoint& aPosition, bool aErase );
|
||||||
|
@ -135,7 +135,7 @@ DIALOG_DIMENSION_EDITOR::DIALOG_DIMENSION_EDITOR( PCB_EDIT_FRAME* aParent,
|
||||||
|
|
||||||
// Configure the layers list selector
|
// Configure the layers list selector
|
||||||
if( !m_Parent->GetBoard()->IsLayerEnabled( aDimension->GetLayer() ) )
|
if( !m_Parent->GetBoard()->IsLayerEnabled( aDimension->GetLayer() ) )
|
||||||
// Should not happens, because one acnnot select a board item on a
|
// Should not happens, because one cannot select a board item on a
|
||||||
// not activated layer, but ...
|
// not activated layer, but ...
|
||||||
m_SelLayerBox->ShowNonActivatedLayers( true );
|
m_SelLayerBox->ShowNonActivatedLayers( true );
|
||||||
|
|
||||||
|
@ -146,11 +146,12 @@ DIALOG_DIMENSION_EDITOR::DIALOG_DIMENSION_EDITOR( PCB_EDIT_FRAME* aParent,
|
||||||
|
|
||||||
if( m_SelLayerBox->SetLayerSelection( aDimension->GetLayer() ) < 0 )
|
if( m_SelLayerBox->SetLayerSelection( aDimension->GetLayer() ) < 0 )
|
||||||
{
|
{
|
||||||
wxMessageBox( _("This item has an illegal layer id.\n"
|
wxMessageBox( _( "This item has an illegal layer id.\n"
|
||||||
"Now, forced on the drawings layer. Please, fix it") );
|
"Now, forced on the drawings layer. Please, fix it" ) );
|
||||||
m_SelLayerBox->SetLayerSelection( Dwgs_User );
|
m_SelLayerBox->SetLayerSelection( Dwgs_User );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetDefaultItem( m_sdbSizerBtsOK );
|
||||||
GetSizer()->Fit( this );
|
GetSizer()->Fit( this );
|
||||||
GetSizer()->SetSizeHints( this );
|
GetSizer()->SetSizeHints( this );
|
||||||
Centre();
|
Centre();
|
||||||
|
@ -169,8 +170,8 @@ void DIALOG_DIMENSION_EDITOR::OnOKClick( wxCommandEvent& event )
|
||||||
|
|
||||||
if( !m_Parent->GetBoard()->IsLayerEnabled( newlayer ) )
|
if( !m_Parent->GetBoard()->IsLayerEnabled( newlayer ) )
|
||||||
{
|
{
|
||||||
wxMessageBox( _( "the layer currently selected is not enabled for this board\n"
|
wxMessageBox( _( "The layer currently selected is not enabled for this board\n"
|
||||||
"You cannot use it" ) );
|
"You cannot use it" ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,16 +214,16 @@ void DIALOG_DIMENSION_EDITOR::OnOKClick( wxCommandEvent& event )
|
||||||
if( width > maxthickness )
|
if( width > maxthickness )
|
||||||
{
|
{
|
||||||
DisplayError( NULL,
|
DisplayError( NULL,
|
||||||
_( "The text thickness is too large for the text size. It will be clamped") );
|
_( "The text thickness is too large for the text size. "
|
||||||
|
"It will be clamped" ) );
|
||||||
width = maxthickness;
|
width = maxthickness;
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentDimension->SetWidth( width );
|
CurrentDimension->SetWidth( width );
|
||||||
CurrentDimension->Text().SetThickness( width );
|
CurrentDimension->Text().SetThickness( width );
|
||||||
|
|
||||||
CurrentDimension->Text().SetMirrored( ( m_rbMirror->GetSelection() == 1 ) ? true : false );
|
CurrentDimension->Text().SetMirrored( ( m_rbMirror->GetSelection() == 1 ) ? true : false );
|
||||||
|
|
||||||
CurrentDimension->SetLayer( newlayer );
|
CurrentDimension->SetLayer( newlayer );
|
||||||
|
|
||||||
#ifndef USE_WX_OVERLAY
|
#ifndef USE_WX_OVERLAY
|
||||||
if( m_DC ) // Display new text
|
if( m_DC ) // Display new text
|
||||||
{
|
{
|
||||||
|
@ -231,6 +232,7 @@ void DIALOG_DIMENSION_EDITOR::OnOKClick( wxCommandEvent& event )
|
||||||
#else
|
#else
|
||||||
m_Parent->Refresh();
|
m_Parent->Refresh();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_Parent->OnModify();
|
m_Parent->OnModify();
|
||||||
EndModal( 1 );
|
EndModal( 1 );
|
||||||
}
|
}
|
||||||
|
@ -285,7 +287,6 @@ DIMENSION* PCB_EDIT_FRAME::EditDimension( DIMENSION* aDimension, wxDC* aDC )
|
||||||
aDimension->Text().SetThickness( width );
|
aDimension->Text().SetThickness( width );
|
||||||
aDimension->SetWidth( width );
|
aDimension->SetWidth( width );
|
||||||
aDimension->AdjustDimensionDetails();
|
aDimension->AdjustDimensionDetails();
|
||||||
|
|
||||||
aDimension->Draw( m_canvas, aDC, GR_XOR );
|
aDimension->Draw( m_canvas, aDC, GR_XOR );
|
||||||
|
|
||||||
m_canvas->SetMouseCapture( BuildDimension, AbortBuildDimension );
|
m_canvas->SetMouseCapture( BuildDimension, AbortBuildDimension );
|
||||||
|
@ -316,7 +317,7 @@ DIMENSION* PCB_EDIT_FRAME::EditDimension( DIMENSION* aDimension, wxDC* aDC )
|
||||||
|
|
||||||
|
|
||||||
static void BuildDimension( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
|
static void BuildDimension( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
|
||||||
const wxPoint& aPosition, bool aErase )
|
const wxPoint& aPosition, bool aErase )
|
||||||
{
|
{
|
||||||
PCB_SCREEN* screen = (PCB_SCREEN*) aPanel->GetScreen();
|
PCB_SCREEN* screen = (PCB_SCREEN*) aPanel->GetScreen();
|
||||||
DIMENSION* Dimension = (DIMENSION*) screen->GetCurItem();
|
DIMENSION* Dimension = (DIMENSION*) screen->GetCurItem();
|
||||||
|
@ -377,9 +378,11 @@ void PCB_EDIT_FRAME::DeleteDimension( DIMENSION* aDimension, wxDC* aDC )
|
||||||
OnModify();
|
OnModify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Initialize parameters to move a pcb text
|
/* Initialize parameters to move a pcb text
|
||||||
*/
|
*/
|
||||||
static wxPoint initialTextPosition;
|
static wxPoint initialTextPosition;
|
||||||
|
|
||||||
void PCB_EDIT_FRAME::BeginMoveDimensionText( DIMENSION* aItem, wxDC* DC )
|
void PCB_EDIT_FRAME::BeginMoveDimensionText( DIMENSION* aItem, wxDC* DC )
|
||||||
{
|
{
|
||||||
if( aItem == NULL )
|
if( aItem == NULL )
|
||||||
|
@ -403,7 +406,7 @@ void PCB_EDIT_FRAME::BeginMoveDimensionText( DIMENSION* aItem, wxDC* DC )
|
||||||
|
|
||||||
/* Move dimension text following the cursor. */
|
/* Move dimension text following the cursor. */
|
||||||
static void MoveDimensionText( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
|
static void MoveDimensionText( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
|
||||||
bool aErase )
|
bool aErase )
|
||||||
{
|
{
|
||||||
DIMENSION* dimension = (DIMENSION*) aPanel->GetScreen()->GetCurItem();
|
DIMENSION* dimension = (DIMENSION*) aPanel->GetScreen()->GetCurItem();
|
||||||
|
|
||||||
|
@ -418,6 +421,7 @@ static void MoveDimensionText( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
|
||||||
dimension->Draw( aPanel, aDC, GR_XOR );
|
dimension->Draw( aPanel, aDC, GR_XOR );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Abort current text edit progress.
|
* Abort current text edit progress.
|
||||||
*
|
*
|
||||||
|
@ -439,6 +443,7 @@ void AbortMoveDimensionText( EDA_DRAW_PANEL* aPanel, wxDC* aDC )
|
||||||
dimension->Draw( aPanel, aDC, GR_OR );
|
dimension->Draw( aPanel, aDC, GR_OR );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Place the current dimension text being moving
|
* Place the current dimension text being moving
|
||||||
*/
|
*/
|
||||||
|
@ -457,6 +462,5 @@ void PCB_EDIT_FRAME::PlaceDimensionText( DIMENSION* aItem, wxDC* DC )
|
||||||
aItem->Text().SetTextPosition( initialTextPosition );
|
aItem->Text().SetTextPosition( initialTextPosition );
|
||||||
SaveCopyInUndoList( aItem, UR_CHANGED );
|
SaveCopyInUndoList( aItem, UR_CHANGED );
|
||||||
aItem->Text().SetTextPosition( tmp );
|
aItem->Text().SetTextPosition( tmp );
|
||||||
|
|
||||||
aItem->ClearFlags();
|
aItem->ClearFlags();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue