Fp editor, DIALOG_PAD_PROPERTIES: do not disable posX and posY settings.
When a pad is locked, posX and posY settings in DIALOG_PAD_PROPERTIES must be locked only for the board editor, not in the fp editor.
This commit is contained in:
parent
d64f1b3b25
commit
76cc7b98a7
|
@ -38,6 +38,7 @@
|
|||
#include <dialogs/html_messagebox.h>
|
||||
#include <macros.h>
|
||||
#include <pcb_base_frame.h>
|
||||
#include <footprint_edit_frame.h>
|
||||
#include <pcb_painter.h>
|
||||
#include <pcbnew_settings.h>
|
||||
#include <settings/color_settings.h>
|
||||
|
@ -136,6 +137,7 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, PAD* aPad
|
|||
m_thermalGap( aParent, m_thermalGapLabel, m_thermalGapCtrl, m_thermalGapUnits, true )
|
||||
{
|
||||
SetName( PAD_PROPERTIES_DLG_NAME );
|
||||
m_isFpEditor = dynamic_cast<FOOTPRINT_EDIT_FRAME*>( aParent ) != nullptr;
|
||||
|
||||
m_currentPad = aPad; // aPad can be NULL, if the dialog is called
|
||||
// from the footprint editor to set default pad setup
|
||||
|
@ -189,7 +191,7 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, PAD* aPad
|
|||
m_staticTextPrimitiveListWarning->SetFont( infoFont );
|
||||
|
||||
// Do not allow locking items in the footprint editor
|
||||
m_locked->Show( dynamic_cast<PCB_EDIT_FRAME*>( aParent ) != nullptr );
|
||||
m_locked->Show( !m_isFpEditor );
|
||||
|
||||
// Usually, TransferDataToWindow is called by OnInitDialog
|
||||
// calling it here fixes all widget sizes so FinishDialogSettings can safely fix minsizes
|
||||
|
@ -994,8 +996,8 @@ void DIALOG_PAD_PROPERTIES::PadTypeSelected( wxCommandEvent& event )
|
|||
void DIALOG_PAD_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event )
|
||||
{
|
||||
// Enable/disable position
|
||||
m_posX.Enable( !m_locked->GetValue() );
|
||||
m_posY.Enable( !m_locked->GetValue() );
|
||||
m_posX.Enable( !m_locked->GetValue() || m_isFpEditor );
|
||||
m_posY.Enable( !m_locked->GetValue() || m_isFpEditor );
|
||||
|
||||
bool hasHole = true;
|
||||
bool hasConnection = true;
|
||||
|
@ -1547,7 +1549,7 @@ bool DIALOG_PAD_PROPERTIES::TransferDataFromWindow()
|
|||
|
||||
m_currentPad->SetLocked( m_locked->GetValue() );
|
||||
|
||||
if( !m_locked->GetValue() )
|
||||
if( !m_locked->GetValue() || m_isFpEditor )
|
||||
m_currentPad->SetPosition( m_padMaster->GetPosition() );
|
||||
|
||||
wxSize size;
|
||||
|
|
|
@ -64,6 +64,7 @@ private:
|
|||
// which case some Y coordinates values must be negated
|
||||
bool m_canUpdate;
|
||||
bool m_canEditNetName; // true only if the caller is the board editor
|
||||
bool m_isFpEditor; // true if the caller is the footprint editor
|
||||
|
||||
std::vector<std::shared_ptr<PCB_SHAPE>> m_primitives; // the custom shape primitives in
|
||||
// local coords, orient 0
|
||||
|
|
Loading…
Reference in New Issue