Clean up wxValidator window association
wxValidator::SetWindow was used too many times due to me being a dunderhead who can't read the docs.
This commit is contained in:
parent
8325d6fdf0
commit
4d77388216
|
@ -73,6 +73,7 @@ DIALOG_MODULE_BOARD_EDITOR::DIALOG_MODULE_BOARD_EDITOR( PCB_EDIT_FRAME* aParent
|
|||
|
||||
m_OrientValidator.SetRange( -360.0, 360.0 );
|
||||
m_OrientValueCtrl->SetValidator( m_OrientValidator );
|
||||
m_OrientValidator.SetWindow( m_OrientValueCtrl );
|
||||
|
||||
m_PreviewPane = new PANEL_PREV_3D( m_Panel3D, aParent->Prj().Get3DCacheManager() );
|
||||
bLowerSizer3D->Add( m_PreviewPane, 1, wxEXPAND, 5 );
|
||||
|
@ -147,7 +148,6 @@ void DIALOG_MODULE_BOARD_EDITOR::InitBoardProperties()
|
|||
|
||||
m_OrientValueCtrl->Enable( custom_orientation );
|
||||
m_OrientValue = m_CurrentModule->GetOrientation() / 10.0;
|
||||
m_OrientValidator.SetWindow( m_OrientValueCtrl );
|
||||
m_OrientValidator.TransferToWindow();
|
||||
|
||||
// Initialize dialog relative to masks clearances
|
||||
|
@ -245,7 +245,6 @@ void DIALOG_MODULE_BOARD_EDITOR::ModuleOrientEvent( wxCommandEvent& event )
|
|||
break;
|
||||
}
|
||||
|
||||
m_OrientValidator.SetWindow( m_OrientValueCtrl );
|
||||
m_OrientValidator.TransferToWindow();
|
||||
m_OrientValueCtrl->Enable( custom_orientation );
|
||||
}
|
||||
|
|
|
@ -75,6 +75,7 @@ DialogEditModuleText::DialogEditModuleText( PCB_BASE_FRAME* aParent,
|
|||
|
||||
m_OrientValidator.SetRange( -90.0, 90.0 );
|
||||
m_OrientValueCtrl->SetValidator( m_OrientValidator );
|
||||
m_OrientValidator.SetWindow( m_OrientValueCtrl );
|
||||
|
||||
if( m_currentText )
|
||||
m_module = (MODULE*) m_currentText->GetParent();
|
||||
|
@ -182,7 +183,6 @@ bool DialogEditModuleText::TransferDataToWindow()
|
|||
|
||||
m_OrientValueCtrl->Enable( custom_orientation );
|
||||
m_OrientValue = text_orient / 10.0;
|
||||
m_OrientValidator.SetWindow( m_OrientValueCtrl );
|
||||
m_OrientValidator.TransferToWindow();
|
||||
|
||||
// Configure the layers list selector
|
||||
|
@ -309,7 +309,6 @@ bool DialogEditModuleText::TransferDataFromWindow()
|
|||
}
|
||||
m_OrientValue = 10.0 * m_currentText->GetOrientation();
|
||||
m_OrientValueCtrl->Enable( custom_orientation );
|
||||
m_OrientValidator.SetWindow( m_OrientValueCtrl );
|
||||
m_OrientValidator.TransferToWindow();
|
||||
|
||||
m_currentText->SetDrawCoord();
|
||||
|
@ -360,7 +359,6 @@ void DialogEditModuleText::ModuleOrientEvent( wxCommandEvent& event )
|
|||
break;
|
||||
}
|
||||
|
||||
m_OrientValidator.SetWindow( m_OrientValueCtrl );
|
||||
m_OrientValidator.TransferToWindow();
|
||||
m_OrientValueCtrl->Enable( custom_orientation );
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
|
|||
|
||||
m_OrientValidator.SetRange( -360.0, 360.0 );
|
||||
m_PadOrientCtrl->SetValidator( m_OrientValidator );
|
||||
m_OrientValidator.SetWindow( m_PadOrientCtrl );
|
||||
|
||||
m_padMaster = &m_parent->GetDesignSettings().m_Pad_Master;
|
||||
m_dummyPad = new D_PAD( (MODULE*) NULL );
|
||||
|
@ -674,7 +675,6 @@ void DIALOG_PAD_PROPERTIES::PadOrientEvent( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
m_OrientValue = m_dummyPad->GetOrientation() / 10.0;
|
||||
m_OrientValidator.SetWindow( m_PadOrientCtrl );
|
||||
m_OrientValidator.TransferToWindow();
|
||||
|
||||
transferDataToPad( m_dummyPad );
|
||||
|
@ -1059,7 +1059,6 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad )
|
|||
if( !m_localSettingsPanel->Validate() )
|
||||
return true;
|
||||
|
||||
m_OrientValidator.SetWindow( m_PadOrientCtrl );
|
||||
m_OrientValidator.TransferFromWindow();
|
||||
|
||||
aPad->SetAttribute( code_type[m_PadType->GetSelection()] );
|
||||
|
|
Loading…
Reference in New Issue