Change teardrop edge shape to a checkbox.
This commit is contained in:
parent
b442d769fd
commit
56853a6209
|
@ -66,44 +66,14 @@ protected:
|
|||
}
|
||||
void onCurvedEdgesUpdateUi( wxUpdateUIEvent& event ) override
|
||||
{
|
||||
event.Enable( m_specifiedValues->GetValue() && m_rbCurved->GetValue() );
|
||||
event.Enable( m_specifiedValues->GetValue()
|
||||
&& m_curvedEdges->GetValue() == wxCHK_CHECKED );
|
||||
}
|
||||
void onFilterUpdateUi( wxUpdateUIEvent& event ) override
|
||||
{
|
||||
event.Enable( !m_trackToTrack->GetValue() );
|
||||
}
|
||||
|
||||
// We can't use standard wxWidgets radio button processing for these because you must
|
||||
// be able to turn them both off to set a "don't modify" state
|
||||
void onStraightLines( wxMouseEvent& event ) override
|
||||
{
|
||||
if( !m_rbStraightLines->GetValue() )
|
||||
{
|
||||
m_rbStraightLines->SetValue( true );
|
||||
m_rbAntiCurved->SetValue( true );
|
||||
m_rbCurved->SetValue( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_rbAntiStraight->SetValue( true );
|
||||
m_rbStraightLines->SetValue( false );
|
||||
}
|
||||
}
|
||||
void onCurvedLines( wxMouseEvent& event ) override
|
||||
{
|
||||
if( !m_rbCurved->GetValue() )
|
||||
{
|
||||
m_rbCurved->SetValue( true );
|
||||
m_rbAntiStraight->SetValue( true );
|
||||
m_rbStraightLines->SetValue( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_rbAntiCurved->SetValue( true );
|
||||
m_rbCurved->SetValue( false );
|
||||
}
|
||||
}
|
||||
|
||||
// Track-to-track teardrops always follow the document-wide settings (there are no teardrop
|
||||
// properties on individual track segments as they're too ephemeral). Therefore we disable
|
||||
// Set-to-specified-values when track-to-track is selected.
|
||||
|
@ -170,7 +140,6 @@ private:
|
|||
UNIT_BINDER m_teardropMaxLen;
|
||||
UNIT_BINDER m_teardropHeightPercent;
|
||||
UNIT_BINDER m_teardropMaxHeight;
|
||||
UNIT_BINDER m_curvePoints;
|
||||
};
|
||||
|
||||
|
||||
|
@ -180,8 +149,7 @@ DIALOG_GLOBAL_EDIT_TEARDROPS::DIALOG_GLOBAL_EDIT_TEARDROPS( PCB_EDIT_FRAME* aPar
|
|||
m_teardropLenPercent( aParent, m_stLenPercentLabel, m_tcLenPercent, m_stLenPercentUnits ),
|
||||
m_teardropMaxLen( aParent, m_stMaxLen, m_tcTdMaxLen, m_stMaxLenUnits ),
|
||||
m_teardropHeightPercent( aParent, m_stHeightPercentLabel, m_tcHeightPercent, m_stHeightPercentUnits ),
|
||||
m_teardropMaxHeight( aParent, m_stMaxHeight, m_tcMaxHeight, m_stMaxHeightUnits ),
|
||||
m_curvePoints( aParent, m_curvePointsLabel, m_curvePointsCtrl, nullptr )
|
||||
m_teardropMaxHeight( aParent, m_stMaxHeight, m_tcMaxHeight, m_stMaxHeightUnits )
|
||||
{
|
||||
m_parent = aParent;
|
||||
m_brd = m_parent->GetBoard();
|
||||
|
@ -191,7 +159,6 @@ DIALOG_GLOBAL_EDIT_TEARDROPS::DIALOG_GLOBAL_EDIT_TEARDROPS( PCB_EDIT_FRAME* aPar
|
|||
m_teardropHDPercent.SetUnits( EDA_UNITS::PERCENT );
|
||||
m_teardropLenPercent.SetUnits( EDA_UNITS::PERCENT );
|
||||
m_teardropHeightPercent.SetUnits( EDA_UNITS::PERCENT );
|
||||
m_curvePoints.SetUnits( EDA_UNITS::UNSCALED );
|
||||
|
||||
m_minTrackWidthHint->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
||||
|
||||
|
@ -320,7 +287,7 @@ bool DIALOG_GLOBAL_EDIT_TEARDROPS::TransferDataToWindow()
|
|||
m_teardropMaxLen.SetValue( INDETERMINATE_ACTION );
|
||||
m_teardropHeightPercent.SetValue( INDETERMINATE_ACTION );
|
||||
m_teardropMaxHeight.SetValue( INDETERMINATE_ACTION );
|
||||
m_curvePoints.SetValue( INDETERMINATE_ACTION );
|
||||
m_curvedEdges->Set3StateValue( wxCHK_UNDETERMINED );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -349,16 +316,12 @@ void DIALOG_GLOBAL_EDIT_TEARDROPS::setSpecifiedParams( TEARDROP_PARAMETERS* targ
|
|||
if( !m_teardropMaxHeight.IsIndeterminate() )
|
||||
targetParams->m_TdMaxWidth = m_teardropMaxHeight.GetIntValue();
|
||||
|
||||
if( m_rbStraightLines->GetValue() )
|
||||
if( m_curvedEdges->Get3StateValue() != wxCHK_UNDETERMINED )
|
||||
{
|
||||
targetParams->m_CurveSegCount = 0;
|
||||
}
|
||||
else if( m_rbCurved->GetValue() )
|
||||
{
|
||||
if( !m_curvePoints.IsIndeterminate() )
|
||||
targetParams->m_CurveSegCount = m_curvePoints.GetIntValue();
|
||||
else if( targetParams->m_CurveSegCount == 0 )
|
||||
targetParams->m_CurveSegCount = 5;
|
||||
if( m_curvedEdges->GetValue() )
|
||||
targetParams->m_CurveSegCount = m_curvePointsCtrl->GetValue();
|
||||
else
|
||||
targetParams->m_CurveSegCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -201,26 +201,6 @@ DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::DIALOG_GLOBAL_EDIT_TEARDROPS_BASE( wxWindow*
|
|||
wxBoxSizer* bSizer41;
|
||||
bSizer41 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_staticText15 = new wxStaticText( sbAction->GetStaticBox(), wxID_ANY, _("Edges:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText15->Wrap( -1 );
|
||||
bSizer41->Add( m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_rbAntiStraight = new wxRadioButton( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
|
||||
m_rbAntiStraight->Hide();
|
||||
|
||||
bSizer41->Add( m_rbAntiStraight, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_rbStraightLines = new wxRadioButton( sbAction->GetStaticBox(), wxID_ANY, _("Straight lines"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer41->Add( m_rbStraightLines, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_rbAntiCurved = new wxRadioButton( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
|
||||
m_rbAntiCurved->Hide();
|
||||
|
||||
bSizer41->Add( m_rbAntiCurved, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_rbCurved = new wxRadioButton( sbAction->GetStaticBox(), wxID_ANY, _("Curved"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
|
||||
bSizer41->Add( m_rbCurved, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerLeftCol->Add( bSizer41, 0, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
||||
|
@ -230,6 +210,9 @@ DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::DIALOG_GLOBAL_EDIT_TEARDROPS_BASE( wxWindow*
|
|||
|
||||
bSizerShapeColumns->Add( 25, 0, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizer121;
|
||||
bSizer121 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizerRightCol;
|
||||
fgSizerRightCol = new wxFlexGridSizer( 0, 3, 2, 0 );
|
||||
fgSizerRightCol->AddGrowableCol( 1 );
|
||||
|
@ -290,23 +273,32 @@ DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::DIALOG_GLOBAL_EDIT_TEARDROPS_BASE( wxWindow*
|
|||
fgSizerRightCol->Add( m_stMaxHeightUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
|
||||
fgSizerRightCol->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
bSizer121->Add( fgSizerRightCol, 1, wxEXPAND|wxLEFT, 10 );
|
||||
|
||||
|
||||
fgSizerRightCol->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
bSizer121->Add( 0, 8, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizer44;
|
||||
bSizer44 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_curvedEdges = new wxCheckBox( sbAction->GetStaticBox(), wxID_ANY, _("Curved edges"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER );
|
||||
bSizer44->Add( m_curvedEdges, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
fgSizerRightCol->Add( 0, 5, 1, wxEXPAND, 5 );
|
||||
bSizer44->Add( 30, 0, 0, 0, 5 );
|
||||
|
||||
m_curvePointsLabel = new wxStaticText( sbAction->GetStaticBox(), wxID_ANY, _("Curve points:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_curvePointsLabel = new wxStaticText( sbAction->GetStaticBox(), wxID_ANY, _("Points:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_curvePointsLabel->Wrap( -1 );
|
||||
fgSizerRightCol->Add( m_curvePointsLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
|
||||
bSizer44->Add( m_curvePointsLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_curvePointsCtrl = new wxTextCtrl( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
||||
fgSizerRightCol->Add( m_curvePointsCtrl, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
m_curvePointsCtrl = new wxSpinCtrl( sbAction->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 3, 10, 5 );
|
||||
bSizer44->Add( m_curvePointsCtrl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerShapeColumns->Add( fgSizerRightCol, 1, wxEXPAND|wxTOP|wxLEFT, 10 );
|
||||
bSizer121->Add( bSizer44, 0, wxEXPAND|wxLEFT, 3 );
|
||||
|
||||
|
||||
bSizerShapeColumns->Add( bSizer121, 1, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
|
||||
bSizerSpecifiedValues->Add( bSizerShapeColumns, 1, wxEXPAND|wxBOTTOM, 3 );
|
||||
|
@ -353,11 +345,6 @@ DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::DIALOG_GLOBAL_EDIT_TEARDROPS_BASE( wxWindow*
|
|||
m_stHDRatioUnits->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_minTrackWidthHint->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_bitmapTeardrop->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_staticText15->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_rbStraightLines->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onStraightLines ), NULL, this );
|
||||
m_rbStraightLines->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_rbCurved->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onCurvedLines ), NULL, this );
|
||||
m_rbCurved->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_stLenPercentLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_tcLenPercent->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_stLenPercentUnits->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
|
@ -370,6 +357,7 @@ DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::DIALOG_GLOBAL_EDIT_TEARDROPS_BASE( wxWindow*
|
|||
m_stMaxHeight->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_tcMaxHeight->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_stMaxHeightUnits->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_curvedEdges->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_curvePointsLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onCurvedEdgesUpdateUi ), NULL, this );
|
||||
m_curvePointsCtrl->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onCurvedEdgesUpdateUi ), NULL, this );
|
||||
}
|
||||
|
@ -398,11 +386,6 @@ DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::~DIALOG_GLOBAL_EDIT_TEARDROPS_BASE()
|
|||
m_stHDRatioUnits->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_minTrackWidthHint->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_bitmapTeardrop->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_staticText15->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_rbStraightLines->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onStraightLines ), NULL, this );
|
||||
m_rbStraightLines->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_rbCurved->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onCurvedLines ), NULL, this );
|
||||
m_rbCurved->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_stLenPercentLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_tcLenPercent->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_stLenPercentUnits->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
|
@ -415,6 +398,7 @@ DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::~DIALOG_GLOBAL_EDIT_TEARDROPS_BASE()
|
|||
m_stMaxHeight->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_tcMaxHeight->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_stMaxHeightUnits->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_curvedEdges->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onSpecifiedValuesUpdateUi ), NULL, this );
|
||||
m_curvePointsLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onCurvedEdgesUpdateUi ), NULL, this );
|
||||
m_curvePointsCtrl->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEARDROPS_BASE::onCurvedEdgesUpdateUi ), NULL, this );
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -32,6 +32,7 @@ class PCB_LAYER_BOX_SELECTOR;
|
|||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/statbmp.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
|
@ -72,11 +73,6 @@ class DIALOG_GLOBAL_EDIT_TEARDROPS_BASE : public DIALOG_SHIM
|
|||
wxStaticText* m_stHDRatioUnits;
|
||||
wxStaticText* m_minTrackWidthHint;
|
||||
wxStaticBitmap* m_bitmapTeardrop;
|
||||
wxStaticText* m_staticText15;
|
||||
wxRadioButton* m_rbAntiStraight;
|
||||
wxRadioButton* m_rbStraightLines;
|
||||
wxRadioButton* m_rbAntiCurved;
|
||||
wxRadioButton* m_rbCurved;
|
||||
wxStaticText* m_stLenPercentLabel;
|
||||
wxTextCtrl* m_tcLenPercent;
|
||||
wxStaticText* m_stLenPercentUnits;
|
||||
|
@ -89,8 +85,9 @@ class DIALOG_GLOBAL_EDIT_TEARDROPS_BASE : public DIALOG_SHIM
|
|||
wxStaticText* m_stMaxHeight;
|
||||
wxTextCtrl* m_tcMaxHeight;
|
||||
wxStaticText* m_stMaxHeightUnits;
|
||||
wxCheckBox* m_curvedEdges;
|
||||
wxStaticText* m_curvePointsLabel;
|
||||
wxTextCtrl* m_curvePointsCtrl;
|
||||
wxSpinCtrl* m_curvePointsCtrl;
|
||||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
|
@ -103,8 +100,6 @@ class DIALOG_GLOBAL_EDIT_TEARDROPS_BASE : public DIALOG_SHIM
|
|||
virtual void OnExistingFilterSelect( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onShowBoardSetup( wxHyperlinkEvent& event ) { event.Skip(); }
|
||||
virtual void onSpecifiedValuesUpdateUi( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void onStraightLines( wxMouseEvent& event ) { event.Skip(); }
|
||||
virtual void onCurvedLines( wxMouseEvent& event ) { event.Skip(); }
|
||||
virtual void onCurvedEdgesUpdateUi( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
|
|
@ -576,16 +576,12 @@ void DIALOG_PAD_PROPERTIES::initValues()
|
|||
m_spTeardropSizePercent->SetValue( m_previewPad->GetTeardropParams().m_BestWidthRatio *100 );
|
||||
m_spTeardropHDPercent->SetValue( m_previewPad->GetTeardropParams().m_WidthtoSizeFilterRatio*100 );
|
||||
|
||||
if( m_previewPad->GetTeardropParams().IsCurved() )
|
||||
{
|
||||
m_rbCurved->SetValue( true );
|
||||
m_curvedEdges->SetValue( m_previewPad->GetTeardropParams().IsCurved() );
|
||||
|
||||
if( m_curvedEdges->GetValue() )
|
||||
m_curvePointsCtrl->SetValue( m_previewPad->GetTeardropParams().m_CurveSegCount );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_rbStraightLines->SetValue( true );
|
||||
m_curvePointsCtrl->SetValue( 5 );
|
||||
}
|
||||
|
||||
switch( m_previewPad->GetZoneConnection() )
|
||||
{
|
||||
|
@ -1138,7 +1134,7 @@ void DIALOG_PAD_PROPERTIES::onTeardropsUpdateUi( wxUpdateUIEvent& event )
|
|||
|
||||
void DIALOG_PAD_PROPERTIES::onTeardropCurvePointsUpdateUi( wxUpdateUIEvent& event )
|
||||
{
|
||||
event.Enable( !m_board->LegacyTeardrops() && m_rbCurved->GetValue() );
|
||||
event.Enable( !m_board->LegacyTeardrops() && m_curvedEdges->GetValue() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1793,10 +1789,10 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( PAD* aPad )
|
|||
aPad->GetTeardropParams().m_BestLengthRatio = m_spTeardropLenPercent->GetValue() / 100;
|
||||
aPad->GetTeardropParams().m_BestWidthRatio = m_spTeardropSizePercent->GetValue() / 100;
|
||||
|
||||
if( m_rbStraightLines->GetValue() )
|
||||
aPad->GetTeardropParams().m_CurveSegCount = 0;
|
||||
else
|
||||
if( m_curvedEdges->GetValue() )
|
||||
aPad->GetTeardropParams().m_CurveSegCount = m_curvePointsCtrl->GetValue();
|
||||
else
|
||||
aPad->GetTeardropParams().m_CurveSegCount = 0;
|
||||
|
||||
aPad->GetTeardropParams().m_WidthtoSizeFilterRatio = m_spTeardropHDPercent->GetValue() / 100;
|
||||
|
||||
|
|
|
@ -680,28 +680,15 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
|
|||
m_bitmapTeardrop = new wxStaticBitmap( bSizerTeardrops->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerLeftCol->Add( m_bitmapTeardrop, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizer41;
|
||||
bSizer41 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_edgesLabel = new wxStaticText( bSizerTeardrops->GetStaticBox(), wxID_ANY, _("Edges:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_edgesLabel->Wrap( -1 );
|
||||
bSizer41->Add( m_edgesLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_rbStraightLines = new wxRadioButton( bSizerTeardrops->GetStaticBox(), wxID_ANY, _("Straight lines"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
|
||||
bSizer41->Add( m_rbStraightLines, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_rbCurved = new wxRadioButton( bSizerTeardrops->GetStaticBox(), wxID_ANY, _("Curved"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer41->Add( m_rbCurved, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
bSizerLeftCol->Add( bSizer41, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerShapeColumns->Add( bSizerLeftCol, 1, wxEXPAND|wxRIGHT, 10 );
|
||||
|
||||
|
||||
bSizerShapeColumns->Add( 10, 0, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizer43;
|
||||
bSizer43 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizerRightCol;
|
||||
fgSizerRightCol = new wxFlexGridSizer( 0, 3, 2, 0 );
|
||||
fgSizerRightCol->AddGrowableCol( 1 );
|
||||
|
@ -712,7 +699,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
|
|||
m_stHsetting->Wrap( -1 );
|
||||
fgSizerRightCol->Add( m_stHsetting, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_spTeardropLenPercent = new wxSpinCtrlDouble( bSizerTeardrops->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 20, 100, 40.000000, 10 );
|
||||
m_spTeardropLenPercent = new wxSpinCtrlDouble( bSizerTeardrops->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 20, 200, 40.000000, 10 );
|
||||
m_spTeardropLenPercent->SetDigits( 0 );
|
||||
fgSizerRightCol->Add( m_spTeardropLenPercent, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
@ -764,23 +751,29 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
|
|||
fgSizerRightCol->Add( m_stMaxHeightUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||
|
||||
|
||||
fgSizerRightCol->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
bSizer43->Add( fgSizerRightCol, 1, wxEXPAND|wxTOP|wxLEFT, 10 );
|
||||
|
||||
wxBoxSizer* bSizer44;
|
||||
bSizer44 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_curvedEdges = new wxCheckBox( bSizerTeardrops->GetStaticBox(), wxID_ANY, _("Curved edges"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer44->Add( m_curvedEdges, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
fgSizerRightCol->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
bSizer44->Add( 45, 0, 0, 0, 5 );
|
||||
|
||||
|
||||
fgSizerRightCol->Add( 0, 5, 1, wxEXPAND, 5 );
|
||||
|
||||
m_curvePointsLabel = new wxStaticText( bSizerTeardrops->GetStaticBox(), wxID_ANY, _("Curve points:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_curvePointsLabel = new wxStaticText( bSizerTeardrops->GetStaticBox(), wxID_ANY, _("Points:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_curvePointsLabel->Wrap( -1 );
|
||||
fgSizerRightCol->Add( m_curvePointsLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
|
||||
bSizer44->Add( m_curvePointsLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_curvePointsCtrl = new wxSpinCtrl( bSizerTeardrops->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 3, 10, 5 );
|
||||
fgSizerRightCol->Add( m_curvePointsCtrl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
bSizer44->Add( m_curvePointsCtrl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerShapeColumns->Add( fgSizerRightCol, 1, wxEXPAND|wxTOP|wxLEFT, 10 );
|
||||
bSizer43->Add( bSizer44, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
|
||||
|
||||
|
||||
bSizerShapeColumns->Add( bSizer43, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerTeardrops->Add( bSizerShapeColumns, 1, wxEXPAND|wxBOTTOM, 5 );
|
||||
|
@ -1290,9 +1283,6 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
|
|||
m_minTrackWidthHint->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_teardropShapeLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_bitmapTeardrop->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_edgesLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_rbStraightLines->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_rbCurved->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_stHsetting->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_spTeardropLenPercent->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_stTeardropLenUnits->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
|
@ -1376,9 +1366,6 @@ DIALOG_PAD_PROPERTIES_BASE::~DIALOG_PAD_PROPERTIES_BASE()
|
|||
m_minTrackWidthHint->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_teardropShapeLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_bitmapTeardrop->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_edgesLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_rbStraightLines->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_rbCurved->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_stHsetting->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_spTeardropLenPercent->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_stTeardropLenUnits->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PAD_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -36,7 +36,6 @@ class wxListView;
|
|||
#include <wx/statbmp.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/notebook.h>
|
||||
|
@ -184,9 +183,6 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
wxStaticText* m_teardropShapeLabel;
|
||||
wxStaticLine* m_staticline51;
|
||||
wxStaticBitmap* m_bitmapTeardrop;
|
||||
wxStaticText* m_edgesLabel;
|
||||
wxRadioButton* m_rbStraightLines;
|
||||
wxRadioButton* m_rbCurved;
|
||||
wxStaticText* m_stHsetting;
|
||||
wxSpinCtrlDouble* m_spTeardropLenPercent;
|
||||
wxStaticText* m_stTeardropLenUnits;
|
||||
|
@ -199,6 +195,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
wxStaticText* m_stTdMaxSize;
|
||||
wxTextCtrl* m_tcMaxHeight;
|
||||
wxStaticText* m_stMaxHeightUnits;
|
||||
wxCheckBox* m_curvedEdges;
|
||||
wxStaticText* m_curvePointsLabel;
|
||||
wxSpinCtrl* m_curvePointsCtrl;
|
||||
wxStaticBoxSizer* m_sbSizerZonesSettings;
|
||||
|
|
|
@ -60,7 +60,6 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
|
|||
m_teardropMaxLen( aParent, m_stMaxLen, m_tcTdMaxLen, m_stMaxLenUnits ),
|
||||
m_teardropHeightPercent( aParent, m_stHeightPercentLabel, m_tcHeightPercent, m_stHeightPercentUnits ),
|
||||
m_teardropMaxHeight( aParent, m_stMaxHeight, m_tcMaxHeight, m_stMaxHeightUnits ),
|
||||
m_curvePoints( aParent, m_curvePointsLabel, m_curvePointsCtrl, nullptr ),
|
||||
m_tracks( false ),
|
||||
m_vias( false )
|
||||
{
|
||||
|
@ -76,7 +75,6 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
|
|||
m_teardropHDPercent.SetUnits( EDA_UNITS::PERCENT );
|
||||
m_teardropLenPercent.SetUnits( EDA_UNITS::PERCENT );
|
||||
m_teardropHeightPercent.SetUnits( EDA_UNITS::PERCENT );
|
||||
m_curvePoints.SetUnits( EDA_UNITS::UNSCALED );
|
||||
|
||||
m_minTrackWidthHint->SetFont( KIUI::GetInfoFont( this ).Italic() );
|
||||
|
||||
|
@ -157,6 +155,7 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
|
|||
m_trackEndX.SetValue( t->GetEnd().x );
|
||||
m_trackEndY.SetValue( t->GetEnd().y );
|
||||
m_trackWidth.SetValue( t->GetWidth() );
|
||||
m_trackNetclass->SetValue( false );
|
||||
track_selection_layer = t->GetLayer();
|
||||
m_tracks = true;
|
||||
}
|
||||
|
@ -213,7 +212,8 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
|
|||
m_teardropLenPercent.SetDoubleValue( v->GetTeardropParams().m_BestLengthRatio*100.0 );
|
||||
m_teardropHeightPercent.SetDoubleValue( v->GetTeardropParams().m_BestWidthRatio*100.0 );
|
||||
m_teardropHDPercent.SetDoubleValue( v->GetTeardropParams().m_WidthtoSizeFilterRatio*100.0 );
|
||||
m_curvePoints.SetValue( v->GetTeardropParams().m_CurveSegCount );
|
||||
m_curvedEdges->SetValue( v->GetTeardropParams().IsCurved() );
|
||||
m_curvePointsCtrl->SetValue( v->GetTeardropParams().m_CurveSegCount );
|
||||
}
|
||||
else // check if values are the same for every selected via
|
||||
{
|
||||
|
@ -270,8 +270,11 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
|
|||
if( m_teardropHDPercent.GetDoubleValue() != v->GetTeardropParams().m_WidthtoSizeFilterRatio*100.0 )
|
||||
m_teardropHDPercent.SetValue( INDETERMINATE_STATE );
|
||||
|
||||
if( m_curvePoints.GetValue() != v->GetTeardropParams().m_CurveSegCount )
|
||||
m_curvePoints.SetValue( INDETERMINATE_STATE );
|
||||
if( m_curvePointsCtrl->GetValue() != v->GetTeardropParams().m_CurveSegCount )
|
||||
{
|
||||
m_curvedEdges->Set3StateValue( wxCHK_UNDETERMINED );
|
||||
m_curvePointsCtrl->SetValue( 5 );
|
||||
}
|
||||
}
|
||||
|
||||
if( v->IsLocked() )
|
||||
|
@ -386,23 +389,6 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
|
|||
|
||||
m_annularRingsLabel->Show( getLayerDepth() > 1 );
|
||||
m_annularRingsCtrl->Show( getLayerDepth() > 1 );
|
||||
|
||||
if( m_curvePoints.IsIndeterminate() )
|
||||
{
|
||||
m_rbStraightLines->SetValue( false );
|
||||
m_rbCurved->SetValue( false );
|
||||
}
|
||||
else if( m_curvePoints.GetValue() == 0 )
|
||||
{
|
||||
m_rbStraightLines->SetValue( true );
|
||||
m_rbCurved->SetValue( false );
|
||||
m_curvePoints.SetValue( wxEmptyString );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_rbStraightLines->SetValue( false );
|
||||
m_rbCurved->SetValue( true );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -751,19 +737,12 @@ bool DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow()
|
|||
if( !m_teardropHDPercent.IsIndeterminate() )
|
||||
targetParams->m_WidthtoSizeFilterRatio = m_teardropHDPercent.GetDoubleValue() / 100.0;
|
||||
|
||||
if( m_curvePoints.GetValue() != v->GetTeardropParams().m_CurveSegCount )
|
||||
m_curvePoints.SetValue( INDETERMINATE_STATE );
|
||||
|
||||
if( m_rbStraightLines->GetValue() )
|
||||
if( m_curvedEdges->Get3StateValue() != wxCHK_UNDETERMINED )
|
||||
{
|
||||
targetParams->m_CurveSegCount = 0;
|
||||
}
|
||||
else if( m_rbCurved->GetValue() )
|
||||
{
|
||||
if( !m_curvePoints.IsIndeterminate() && m_curvePoints.GetValue() > 0 )
|
||||
targetParams->m_CurveSegCount = m_curvePoints.GetIntValue();
|
||||
else if( targetParams->m_CurveSegCount == 0 )
|
||||
targetParams->m_CurveSegCount = 5;
|
||||
if( m_curvedEdges->GetValue() )
|
||||
targetParams->m_CurveSegCount = m_curvePointsCtrl->GetValue();
|
||||
else
|
||||
targetParams->m_CurveSegCount = 0;
|
||||
}
|
||||
|
||||
if( changeLock )
|
||||
|
@ -964,5 +943,6 @@ void DIALOG_TRACK_VIA_PROPERTIES::onTeardropsUpdateUi( wxUpdateUIEvent& event )
|
|||
|
||||
void DIALOG_TRACK_VIA_PROPERTIES::onCurvedEdgesUpdateUi( wxUpdateUIEvent& event )
|
||||
{
|
||||
event.Enable( !m_frame->GetBoard()->LegacyTeardrops() && m_rbCurved->GetValue() );
|
||||
event.Enable( !m_frame->GetBoard()->LegacyTeardrops()
|
||||
&& m_curvedEdges->Get3StateValue() == wxCHK_CHECKED );
|
||||
}
|
|
@ -77,7 +77,6 @@ private:
|
|||
UNIT_BINDER m_teardropMaxLen;
|
||||
UNIT_BINDER m_teardropHeightPercent;
|
||||
UNIT_BINDER m_teardropMaxHeight;
|
||||
UNIT_BINDER m_curvePoints;
|
||||
|
||||
bool m_tracks; // True if dialog displays any track properties.
|
||||
bool m_vias; // True if dialog displays any via properties.
|
||||
|
|
|
@ -438,28 +438,15 @@ DIALOG_TRACK_VIA_PROPERTIES_BASE::DIALOG_TRACK_VIA_PROPERTIES_BASE( wxWindow* pa
|
|||
m_bitmapTeardrop = new wxStaticBitmap( m_sbViaSizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizerLeftCol->Add( m_bitmapTeardrop, 1, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizer41;
|
||||
bSizer41 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_staticText15 = new wxStaticText( m_sbViaSizer->GetStaticBox(), wxID_ANY, _("Edges:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText15->Wrap( -1 );
|
||||
bSizer41->Add( m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_rbStraightLines = new wxRadioButton( m_sbViaSizer->GetStaticBox(), wxID_ANY, _("Straight lines"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
|
||||
bSizer41->Add( m_rbStraightLines, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_rbCurved = new wxRadioButton( m_sbViaSizer->GetStaticBox(), wxID_ANY, _("Curved"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer41->Add( m_rbCurved, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerLeftCol->Add( bSizer41, 0, wxEXPAND|wxBOTTOM, 4 );
|
||||
|
||||
|
||||
bSizerShapeColumns->Add( bSizerLeftCol, 1, wxEXPAND|wxRIGHT, 10 );
|
||||
|
||||
|
||||
bSizerShapeColumns->Add( 20, 0, 0, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bSizer20;
|
||||
bSizer20 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizerRightCol;
|
||||
fgSizerRightCol = new wxFlexGridSizer( 0, 3, 3, 5 );
|
||||
fgSizerRightCol->AddGrowableCol( 1 );
|
||||
|
@ -520,23 +507,29 @@ DIALOG_TRACK_VIA_PROPERTIES_BASE::DIALOG_TRACK_VIA_PROPERTIES_BASE( wxWindow* pa
|
|||
fgSizerRightCol->Add( m_stMaxHeightUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
|
||||
|
||||
|
||||
fgSizerRightCol->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
bSizer20->Add( fgSizerRightCol, 1, wxEXPAND|wxTOP|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizer44;
|
||||
bSizer44 = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_curvedEdges = new wxCheckBox( m_sbViaSizer->GetStaticBox(), wxID_ANY, _("Curved edges"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER );
|
||||
bSizer44->Add( m_curvedEdges, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
fgSizerRightCol->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
bSizer44->Add( 45, 0, 0, 0, 5 );
|
||||
|
||||
|
||||
fgSizerRightCol->Add( 0, 3, 1, wxEXPAND, 5 );
|
||||
|
||||
m_curvePointsLabel = new wxStaticText( m_sbViaSizer->GetStaticBox(), wxID_ANY, _("Curve points:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_curvePointsLabel = new wxStaticText( m_sbViaSizer->GetStaticBox(), wxID_ANY, _("Points:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_curvePointsLabel->Wrap( -1 );
|
||||
fgSizerRightCol->Add( m_curvePointsLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 3 );
|
||||
bSizer44->Add( m_curvePointsLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
m_curvePointsCtrl = new wxTextCtrl( m_sbViaSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
||||
fgSizerRightCol->Add( m_curvePointsCtrl, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 3 );
|
||||
m_curvePointsCtrl = new wxSpinCtrl( m_sbViaSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 3, 10, 5 );
|
||||
bSizer44->Add( m_curvePointsCtrl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerShapeColumns->Add( fgSizerRightCol, 1, wxEXPAND|wxTOP|wxLEFT, 5 );
|
||||
bSizer20->Add( bSizer44, 0, wxEXPAND|wxTOP|wxLEFT, 8 );
|
||||
|
||||
|
||||
bSizerShapeColumns->Add( bSizer20, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerTeardrops->Add( bSizerShapeColumns, 1, wxEXPAND|wxBOTTOM, 3 );
|
||||
|
@ -582,11 +575,6 @@ DIALOG_TRACK_VIA_PROPERTIES_BASE::DIALOG_TRACK_VIA_PROPERTIES_BASE( wxWindow* pa
|
|||
m_stHDRatioUnits->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_minTrackWidthHint->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_bitmapTeardrop->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_staticText15->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_rbStraightLines->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onStraightLines ), NULL, this );
|
||||
m_rbStraightLines->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_rbCurved->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onCurvedLines ), NULL, this );
|
||||
m_rbCurved->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_stLenPercentLabel->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_tcLenPercent->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_stLenPercentUnits->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
|
@ -624,11 +612,6 @@ DIALOG_TRACK_VIA_PROPERTIES_BASE::~DIALOG_TRACK_VIA_PROPERTIES_BASE()
|
|||
m_stHDRatioUnits->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_minTrackWidthHint->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_bitmapTeardrop->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_staticText15->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_rbStraightLines->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onStraightLines ), NULL, this );
|
||||
m_rbStraightLines->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_rbCurved->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onCurvedLines ), NULL, this );
|
||||
m_rbCurved->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_stLenPercentLabel->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_tcLenPercent->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
m_stLenPercentUnits->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_TRACK_VIA_PROPERTIES_BASE::onTeardropsUpdateUi ), NULL, this );
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -31,7 +31,7 @@ class PCB_LAYER_BOX_SELECTOR;
|
|||
#include <wx/image.h>
|
||||
#include <wx/icon.h>
|
||||
#include <wx/statbmp.h>
|
||||
#include <wx/radiobut.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
||||
|
@ -109,9 +109,6 @@ class DIALOG_TRACK_VIA_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
wxStaticText* m_stHDRatioUnits;
|
||||
wxStaticText* m_minTrackWidthHint;
|
||||
wxStaticBitmap* m_bitmapTeardrop;
|
||||
wxStaticText* m_staticText15;
|
||||
wxRadioButton* m_rbStraightLines;
|
||||
wxRadioButton* m_rbCurved;
|
||||
wxStaticText* m_stLenPercentLabel;
|
||||
wxTextCtrl* m_tcLenPercent;
|
||||
wxStaticText* m_stLenPercentUnits;
|
||||
|
@ -124,8 +121,9 @@ class DIALOG_TRACK_VIA_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
wxStaticText* m_stMaxHeight;
|
||||
wxTextCtrl* m_tcMaxHeight;
|
||||
wxStaticText* m_stMaxHeightUnits;
|
||||
wxCheckBox* m_curvedEdges;
|
||||
wxStaticText* m_curvePointsLabel;
|
||||
wxTextCtrl* m_curvePointsCtrl;
|
||||
wxSpinCtrl* m_curvePointsCtrl;
|
||||
wxStdDialogButtonSizer* m_StdButtons;
|
||||
wxButton* m_StdButtonsOK;
|
||||
wxButton* m_StdButtonsCancel;
|
||||
|
@ -139,8 +137,6 @@ class DIALOG_TRACK_VIA_PROPERTIES_BASE : public DIALOG_SHIM
|
|||
virtual void onViaEdit( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onViaNetclassCheck( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void onTeardropsUpdateUi( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void onStraightLines( wxMouseEvent& event ) { event.Skip(); }
|
||||
virtual void onCurvedLines( wxMouseEvent& event ) { event.Skip(); }
|
||||
virtual void onCurvedEdgesUpdateUi( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue