Apply display origin transforms in Pcbnew dialog classes
This commit applies display origin transforms to all Pcbnew dialog classes that use UNIT_BINDER for their formatting: * DIALOG_CREATE_ARRAY * DIALOG_FOOTPRINT_BOARD_EDITOR * DIALOG_GRAPHIC_ITEM_PROPERTIES * DIALOG_GRID_SETTINGS * DIALOG_MOVE_EXACT * DIALOG_PAD_PROPERTIES * DIALOG_POSITION_RELATIVE * DIALOG_TEXT_PROPERTIES * DIALOG_TRACK_VIA_PROPERTIES
This commit is contained in:
parent
6f1204cfd7
commit
a9c835275a
|
@ -39,6 +39,10 @@ DIALOG_GRID_SETTINGS::DIALOG_GRID_SETTINGS( EDA_DRAW_FRAME* aParent ):
|
|||
m_userGridX( aParent, m_staticTextSizeX, m_OptGridSizeX, m_TextSizeXUnits, true ),
|
||||
m_userGridY( aParent, m_staticTextSizeY, m_OptGridSizeY, m_TextSizeYUnits, true )
|
||||
{
|
||||
// Configure display origin transforms
|
||||
m_gridOriginX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
|
||||
m_gridOriginY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
||||
|
||||
wxArrayString grids;
|
||||
GRID_MENU::BuildChoiceList( &grids, m_parent->config(), GetUserUnits() != EDA_UNITS::INCHES );
|
||||
m_currentGridCtrl->Append( grids );
|
||||
|
|
|
@ -152,6 +152,14 @@ DIALOG_CREATE_ARRAY::DIALOG_CREATE_ARRAY( PCB_BASE_FRAME* aParent,
|
|||
m_circAngle( aParent, m_labelCircAngle, m_entryCircAngle, m_unitLabelCircAngle ),
|
||||
m_cfg_persister( saved_array_options.m_optionsSet )
|
||||
{
|
||||
// Configure display origin transforms
|
||||
m_hSpacing.SetCoordType( ORIGIN_TRANSFORMS::REL_X_COORD );
|
||||
m_vSpacing.SetCoordType( ORIGIN_TRANSFORMS::REL_Y_COORD );
|
||||
m_hOffset.SetCoordType( ORIGIN_TRANSFORMS::REL_X_COORD );
|
||||
m_vOffset.SetCoordType( ORIGIN_TRANSFORMS::REL_Y_COORD );
|
||||
m_hCentre.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
|
||||
m_vCentre.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
||||
|
||||
// Set up numbering scheme drop downs character set strings
|
||||
for( const auto& numData : numberingTypeData )
|
||||
{
|
||||
|
|
|
@ -63,6 +63,10 @@ DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR( PCB_EDIT_FRAME* aP
|
|||
m_frame = aParent;
|
||||
m_footprint = aModule;
|
||||
|
||||
// Configure display origin transforms
|
||||
m_posX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
|
||||
m_posY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
||||
|
||||
for( size_t i = 0; i < m_NoteBook->GetPageCount(); ++i )
|
||||
m_macHack.push_back( true );
|
||||
|
||||
|
|
|
@ -101,6 +101,16 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES( PCB_BASE_EDIT_FR
|
|||
m_item = dynamic_cast<DRAWSEGMENT*>( aItem );
|
||||
m_moduleItem = dynamic_cast<EDGE_MODULE*>( aItem );
|
||||
|
||||
// Configure display origin transforms
|
||||
m_startX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
|
||||
m_startY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
||||
m_endX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
|
||||
m_endY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
||||
m_bezierCtrl1X.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
|
||||
m_bezierCtrl1Y.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
||||
m_bezierCtrl2X.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
|
||||
m_bezierCtrl2Y.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
||||
|
||||
m_angle.SetUnits( EDA_UNITS::DEGREES );
|
||||
m_AngleValidator.SetRange( -360.0, 360.0 );
|
||||
m_angleCtrl->SetValidator( m_AngleValidator );
|
||||
|
@ -164,6 +174,7 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow()
|
|||
SetTitle( _( "Circle Properties" ) );
|
||||
m_startPointLabel->SetLabel( _( "Center" ) );
|
||||
m_endPointLabel->SetLabel( _( "Radius" ) );
|
||||
m_endY.SetCoordType( ORIGIN_TRANSFORMS::NOT_A_COORD );
|
||||
m_endY.Show( false );
|
||||
break;
|
||||
|
||||
|
|
|
@ -58,6 +58,10 @@ DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT( PCB_BASE_FRAME *aParent, wxPoint& aTransla
|
|||
m_stdButtonsCancel
|
||||
};
|
||||
|
||||
// Configure display origin transforms
|
||||
m_moveX.SetCoordType( ORIGIN_TRANSFORMS::REL_X_COORD );
|
||||
m_moveY.SetCoordType( ORIGIN_TRANSFORMS::REL_Y_COORD );
|
||||
|
||||
updateDialogControls( m_options.polarCoords );
|
||||
|
||||
m_menuIDs.push_back( aAnchor );
|
||||
|
|
|
@ -142,6 +142,10 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
|
|||
|
||||
m_board = m_parent->GetBoard();
|
||||
|
||||
// Configure display origin transforms
|
||||
m_posX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
|
||||
m_posY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
||||
|
||||
m_PadNetSelector->SetBoard( m_board );
|
||||
m_PadNetSelector->SetNetInfo( &m_board->GetNetInfo() );
|
||||
|
||||
|
|
|
@ -53,6 +53,10 @@ DIALOG_POSITION_RELATIVE::DIALOG_POSITION_RELATIVE( PCB_BASE_FRAME* aParent, wxP
|
|||
m_stdButtonsCancel
|
||||
};
|
||||
|
||||
// Configure display origin transforms
|
||||
m_xOffset.SetCoordType( ORIGIN_TRANSFORMS::REL_X_COORD );
|
||||
m_yOffset.SetCoordType( ORIGIN_TRANSFORMS::REL_Y_COORD );
|
||||
|
||||
SetInitialFocus( m_xEntry );
|
||||
|
||||
// and set up the entries according to the saved options
|
||||
|
|
|
@ -59,6 +59,10 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, BO
|
|||
{
|
||||
wxString title;
|
||||
|
||||
// Configure display origin transforms
|
||||
m_posX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
|
||||
m_posY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
||||
|
||||
m_MultiLineText->SetEOLMode( wxSTC_EOL_LF );
|
||||
|
||||
// A hack which causes Scintilla to auto-size the text editor canvas
|
||||
|
|
|
@ -54,6 +54,14 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
|
|||
{
|
||||
wxASSERT( !m_items.Empty() );
|
||||
|
||||
// Configure display origin transforms
|
||||
m_trackStartX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
|
||||
m_trackStartY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
||||
m_trackEndX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
|
||||
m_trackEndY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
||||
m_viaX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
|
||||
m_viaY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
|
||||
|
||||
VIATYPE viaType = VIATYPE::NOT_DEFINED;
|
||||
|
||||
m_TrackLayerCtrl->SetLayersHotkeys( false );
|
||||
|
|
Loading…
Reference in New Issue