mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Remove locking from footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/9496
This commit is contained in:
parent
e3ef101ec9
commit
22ba640c2b
@ -66,7 +66,9 @@ bool BOARD_ITEM::IsLocked() const
|
|||||||
if( GetParentGroup() )
|
if( GetParentGroup() )
|
||||||
return GetParentGroup()->IsLocked();
|
return GetParentGroup()->IsLocked();
|
||||||
|
|
||||||
return GetState( LOCKED );
|
const BOARD* board = GetBoard();
|
||||||
|
|
||||||
|
return board && board->GetBoardUse() != BOARD_USE::FPHOLDER && GetState( LOCKED );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -239,18 +239,6 @@ void DIALOG_FOOTPRINT_PROPERTIES::OnOtherOrientation( wxCommandEvent& aEvent )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool allPadsLocked( FOOTPRINT* aFootprint )
|
|
||||||
{
|
|
||||||
for( PAD* pad : aFootprint->Pads() )
|
|
||||||
{
|
|
||||||
if( !pad->IsLocked() )
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow()
|
bool DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
if( !wxDialog::TransferDataToWindow() )
|
if( !wxDialog::TransferDataToWindow() )
|
||||||
|
@ -43,7 +43,9 @@ DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent,
|
|||||||
m_bpRemoveMember->SetBitmap( KiBitmap( BITMAPS::small_trash ) );
|
m_bpRemoveMember->SetBitmap( KiBitmap( BITMAPS::small_trash ) );
|
||||||
|
|
||||||
m_nameCtrl->SetValue( m_group->GetName() );
|
m_nameCtrl->SetValue( m_group->GetName() );
|
||||||
|
|
||||||
m_locked->SetValue( m_group->IsLocked() );
|
m_locked->SetValue( m_group->IsLocked() );
|
||||||
|
m_locked->Show( dynamic_cast<PCB_EDIT_FRAME*>( aParent ) != nullptr );
|
||||||
|
|
||||||
for( BOARD_ITEM* item : m_group->GetItems() )
|
for( BOARD_ITEM* item : m_group->GetItems() )
|
||||||
m_membersList->Append( item->GetSelectMenuText( m_brdEditor->GetUserUnits() ), item );
|
m_membersList->Append( item->GetSelectMenuText( m_brdEditor->GetUserUnits() ), item );
|
||||||
|
@ -158,7 +158,6 @@ private:
|
|||||||
UNIT_BINDER m_chamferRatio;
|
UNIT_BINDER m_chamferRatio;
|
||||||
UNIT_BINDER m_mixedCornerRatio, m_mixedChamferRatio;
|
UNIT_BINDER m_mixedCornerRatio, m_mixedChamferRatio;
|
||||||
UNIT_BINDER m_holeX, m_holeY;
|
UNIT_BINDER m_holeX, m_holeY;
|
||||||
double m_OrientValue;
|
|
||||||
UNIT_BINDER m_clearance;
|
UNIT_BINDER m_clearance;
|
||||||
UNIT_BINDER m_maskMargin;
|
UNIT_BINDER m_maskMargin;
|
||||||
UNIT_BINDER m_pasteMargin, m_pasteMarginRatio;
|
UNIT_BINDER m_pasteMargin, m_pasteMarginRatio;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
|
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
@ -82,7 +82,7 @@ DIALOG_PAD_PROPERTIES_BASE::DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWind
|
|||||||
m_locked = new wxCheckBox( m_panelGeneral, wxID_ANY, _("Locked"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_locked = new wxCheckBox( m_panelGeneral, wxID_ANY, _("Locked"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_locked->SetToolTip( _("Do not allow position of pad relative to parent footprint to be changed") );
|
m_locked->SetToolTip( _("Do not allow position of pad relative to parent footprint to be changed") );
|
||||||
|
|
||||||
gbSizerCommon->Add( m_locked, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT, 5 );
|
gbSizerCommon->Add( m_locked, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
gbSizerCommon->AddGrowableCol( 1 );
|
gbSizerCommon->AddGrowableCol( 1 );
|
||||||
@ -1442,9 +1442,9 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWi
|
|||||||
m_gridCornersList->SetColSize( 1, 124 );
|
m_gridCornersList->SetColSize( 1, 124 );
|
||||||
m_gridCornersList->EnableDragColMove( false );
|
m_gridCornersList->EnableDragColMove( false );
|
||||||
m_gridCornersList->EnableDragColSize( true );
|
m_gridCornersList->EnableDragColSize( true );
|
||||||
|
m_gridCornersList->SetColLabelSize( 22 );
|
||||||
m_gridCornersList->SetColLabelValue( 0, _("Pos X") );
|
m_gridCornersList->SetColLabelValue( 0, _("Pos X") );
|
||||||
m_gridCornersList->SetColLabelValue( 1, _("Pos Y") );
|
m_gridCornersList->SetColLabelValue( 1, _("Pos Y") );
|
||||||
m_gridCornersList->SetColLabelSize( 22 );
|
|
||||||
m_gridCornersList->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
m_gridCornersList->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||||
|
|
||||||
// Rows
|
// Rows
|
||||||
|
@ -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="16" />
|
<FileVersion major="1" minor="15" />
|
||||||
<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>
|
||||||
@ -14,7 +14,6 @@
|
|||||||
<property name="file">dialog_pad_properties_base</property>
|
<property name="file">dialog_pad_properties_base</property>
|
||||||
<property name="first_id">1000</property>
|
<property name="first_id">1000</property>
|
||||||
<property name="help_provider">none</property>
|
<property name="help_provider">none</property>
|
||||||
<property name="image_path_wrapper_function_name"></property>
|
|
||||||
<property name="indent_with_spaces"></property>
|
<property name="indent_with_spaces"></property>
|
||||||
<property name="internationalize">1</property>
|
<property name="internationalize">1</property>
|
||||||
<property name="name">dialog_pad_properties_base</property>
|
<property name="name">dialog_pad_properties_base</property>
|
||||||
@ -26,7 +25,6 @@
|
|||||||
<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="ui_table">UI</property>
|
||||||
<property name="use_array_enum">0</property>
|
|
||||||
<property name="use_enum">1</property>
|
<property name="use_enum">1</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">
|
||||||
@ -52,7 +50,6 @@
|
|||||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||||
<property name="title">Pad Properties</property>
|
<property name="title">Pad Properties</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
<property name="two_step_creation">0</property>
|
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
@ -1000,7 +997,7 @@
|
|||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="colspan">1</property>
|
<property name="colspan">1</property>
|
||||||
<property name="column">0</property>
|
<property name="column">0</property>
|
||||||
<property name="flag">wxBOTTOM|wxRIGHT</property>
|
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||||
<property name="row">4</property>
|
<property name="row">4</property>
|
||||||
<property name="rowspan">1</property>
|
<property name="rowspan">1</property>
|
||||||
<object class="wxCheckBox" expanded="1">
|
<object class="wxCheckBox" expanded="1">
|
||||||
@ -9297,7 +9294,6 @@
|
|||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position"></property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row"></property>
|
||||||
<property name="auth_needed">0</property>
|
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
||||||
@ -9371,7 +9367,6 @@
|
|||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position"></property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row"></property>
|
||||||
<property name="auth_needed">0</property>
|
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
||||||
@ -9445,7 +9440,6 @@
|
|||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position"></property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row"></property>
|
||||||
<property name="auth_needed">0</property>
|
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
||||||
@ -9519,7 +9513,6 @@
|
|||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position"></property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row"></property>
|
||||||
<property name="auth_needed">0</property>
|
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
||||||
@ -9603,7 +9596,6 @@
|
|||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position"></property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row"></property>
|
||||||
<property name="auth_needed">0</property>
|
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
||||||
@ -10929,7 +10921,6 @@
|
|||||||
<property name="subclass">DIALOG_SHIM; </property>
|
<property name="subclass">DIALOG_SHIM; </property>
|
||||||
<property name="title"></property>
|
<property name="title"></property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
<property name="two_step_creation">0</property>
|
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
@ -13285,7 +13276,6 @@
|
|||||||
<property name="subclass">DIALOG_SHIM; </property>
|
<property name="subclass">DIALOG_SHIM; </property>
|
||||||
<property name="title">Pad Custom Shape Geometry Transform</property>
|
<property name="title">Pad Custom Shape Geometry Transform</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
<property name="two_step_creation">0</property>
|
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
@ -14390,7 +14380,6 @@
|
|||||||
<property name="subclass">DIALOG_SHIM; </property>
|
<property name="subclass">DIALOG_SHIM; </property>
|
||||||
<property name="title">Basic Shape Polygon</property>
|
<property name="title">Basic Shape Polygon</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
<property name="two_step_creation">0</property>
|
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
@ -14529,7 +14518,6 @@
|
|||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position"></property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row"></property>
|
||||||
<property name="auth_needed">0</property>
|
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
||||||
@ -14613,7 +14601,6 @@
|
|||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position"></property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row"></property>
|
||||||
<property name="auth_needed">0</property>
|
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="bitmap"></property>
|
<property name="bitmap"></property>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
|
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
@ -10,10 +10,8 @@
|
|||||||
#include <wx/artprov.h>
|
#include <wx/artprov.h>
|
||||||
#include <wx/xrc/xmlres.h>
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
class DIALOG_SHIM;
|
|
||||||
class TEXT_CTRL_EVAL;
|
class TEXT_CTRL_EVAL;
|
||||||
class WX_GRID;
|
class WX_GRID;
|
||||||
class wxListView;
|
|
||||||
|
|
||||||
#include "dialog_shim.h"
|
#include "dialog_shim.h"
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
@ -236,7 +234,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
|
|||||||
wxButton* m_sdbSizerOK;
|
wxButton* m_sdbSizerOK;
|
||||||
wxButton* m_sdbSizerCancel;
|
wxButton* m_sdbSizerCancel;
|
||||||
|
|
||||||
// Virtual event handlers, override them in your derived class
|
// Virtual event handlers, overide them in your derived class
|
||||||
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
|
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
|
||||||
virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||||
virtual void PadTypeSelected( wxCommandEvent& event ) { event.Skip(); }
|
virtual void PadTypeSelected( wxCommandEvent& event ) { event.Skip(); }
|
||||||
@ -265,7 +263,6 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_DIALOG_EDIT_PAD, const wxString& title = _("Pad Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_DIALOG_EDIT_PAD, const wxString& title = _("Pad Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
|
|
||||||
~DIALOG_PAD_PROPERTIES_BASE();
|
~DIALOG_PAD_PROPERTIES_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -321,7 +318,6 @@ class DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE : public DIALOG_SHIM
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
|
|
||||||
~DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE();
|
~DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -356,7 +352,6 @@ class DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE : public DIALOG_SHIM
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pad Custom Shape Geometry Transform"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
|
DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pad Custom Shape Geometry Transform"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE );
|
||||||
|
|
||||||
~DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE();
|
~DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -385,7 +380,7 @@ class DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE : public DIALOG_SHIM
|
|||||||
wxButton* m_sdbSizerOK;
|
wxButton* m_sdbSizerOK;
|
||||||
wxButton* m_sdbSizerCancel;
|
wxButton* m_sdbSizerCancel;
|
||||||
|
|
||||||
// Virtual event handlers, override them in your derived class
|
// Virtual event handlers, overide them in your derived class
|
||||||
virtual void onGridSelect( wxGridRangeSelectEvent& event ) { event.Skip(); }
|
virtual void onGridSelect( wxGridRangeSelectEvent& event ) { event.Skip(); }
|
||||||
virtual void onCellSelect( wxGridEvent& event ) { event.Skip(); }
|
virtual void onCellSelect( wxGridEvent& event ) { event.Skip(); }
|
||||||
virtual void OnButtonAdd( wxCommandEvent& event ) { event.Skip(); }
|
virtual void OnButtonAdd( wxCommandEvent& event ) { event.Skip(); }
|
||||||
@ -397,7 +392,6 @@ class DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE : public DIALOG_SHIM
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Basic Shape Polygon"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Basic Shape Polygon"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||||
|
|
||||||
~DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE();
|
~DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -74,11 +74,16 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, BO
|
|||||||
|
|
||||||
if( m_item->Type() == PCB_FP_TEXT_T )
|
if( m_item->Type() == PCB_FP_TEXT_T )
|
||||||
{
|
{
|
||||||
title = _( "Footprint Text Properties" );
|
|
||||||
|
|
||||||
m_fpText = (FP_TEXT*) m_item;
|
m_fpText = (FP_TEXT*) m_item;
|
||||||
m_edaText = static_cast<EDA_TEXT*>( m_fpText );
|
m_edaText = static_cast<EDA_TEXT*>( m_fpText );
|
||||||
|
|
||||||
|
switch( m_fpText->GetType() )
|
||||||
|
{
|
||||||
|
case FP_TEXT::TEXT_is_REFERENCE: title = _( "Footprint Reference Properties" ); break;
|
||||||
|
case FP_TEXT::TEXT_is_VALUE: title = _( "Footprint Value Properties" ); break;
|
||||||
|
case FP_TEXT::TEXT_is_DIVERS: title = _( "Footprint Text Properties" ); break;
|
||||||
|
}
|
||||||
|
|
||||||
switch( m_fpText->GetType() )
|
switch( m_fpText->GetType() )
|
||||||
{
|
{
|
||||||
case FP_TEXT::TEXT_is_REFERENCE: m_TextLabel->SetLabel( _( "Reference:" ) ); break;
|
case FP_TEXT::TEXT_is_REFERENCE: m_TextLabel->SetLabel( _( "Reference:" ) ); break;
|
||||||
@ -88,6 +93,9 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, BO
|
|||||||
|
|
||||||
SetInitialFocus( m_SingleLineText );
|
SetInitialFocus( m_SingleLineText );
|
||||||
m_MultiLineSizer->Show( false );
|
m_MultiLineSizer->Show( false );
|
||||||
|
|
||||||
|
// Do not allow locking items in the footprint editor
|
||||||
|
m_cbLocked->Show( false );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -101,7 +109,7 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, BO
|
|||||||
|
|
||||||
// This option makes sense only for footprint texts; texts on board are always visible.
|
// This option makes sense only for footprint texts; texts on board are always visible.
|
||||||
m_Visible->SetValue( true );
|
m_Visible->SetValue( true );
|
||||||
m_Visible->Enable( false );
|
m_Visible->Show( false );
|
||||||
|
|
||||||
m_KeepUpright->Show( false );
|
m_KeepUpright->Show( false );
|
||||||
m_statusLine->Show( false );
|
m_statusLine->Show( false );
|
||||||
|
@ -941,7 +941,7 @@ void FOOTPRINT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
|
|||||||
wxString status;
|
wxString status;
|
||||||
wxString attrs;
|
wxString attrs;
|
||||||
|
|
||||||
if( IsLocked() )
|
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() )
|
||||||
addToken( &status, _( "Locked" ) );
|
addToken( &status, _( "Locked" ) );
|
||||||
|
|
||||||
if( m_fpStatus & FP_is_PLACED )
|
if( m_fpStatus & FP_is_PLACED )
|
||||||
|
@ -108,10 +108,14 @@ void FP_SHAPE::SetDrawCoord()
|
|||||||
|
|
||||||
|
|
||||||
void FP_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
void FP_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
||||||
|
{
|
||||||
|
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME )
|
||||||
{
|
{
|
||||||
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
|
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
|
||||||
|
|
||||||
aList.emplace_back( _( "Footprint" ), fp ? fp->GetReference() : _( "<invalid>" ) );
|
if( fp )
|
||||||
|
aList.emplace_back( _( "Footprint" ), fp->GetReference() );
|
||||||
|
}
|
||||||
|
|
||||||
// append the features shared with the base class
|
// append the features shared with the base class
|
||||||
PCB_SHAPE::GetMsgPanelInfo( aFrame, aList );
|
PCB_SHAPE::GetMsgPanelInfo( aFrame, aList );
|
||||||
|
@ -264,15 +264,20 @@ double FP_TEXT::GetDrawRotation() const
|
|||||||
|
|
||||||
void FP_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
void FP_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
||||||
{
|
{
|
||||||
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
|
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
||||||
static const wxString text_type_msg[3] =
|
static const wxString text_type_msg[3] =
|
||||||
{
|
{
|
||||||
_( "Ref." ), _( "Value" ), _( "Text" )
|
_( "Reference" ), _( "Value" ), _( "Text" )
|
||||||
};
|
};
|
||||||
|
|
||||||
aList.emplace_back( _( "Footprint" ), fp ? fp->GetReference() : _( "<invalid>" ) );
|
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME )
|
||||||
|
{
|
||||||
|
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
|
||||||
|
|
||||||
|
if( fp )
|
||||||
|
aList.emplace_back( _( "Footprint" ), fp->GetReference() );
|
||||||
|
}
|
||||||
|
|
||||||
// Don't use GetShownText() here; we want to show the user the variable references
|
// Don't use GetShownText() here; we want to show the user the variable references
|
||||||
aList.emplace_back( _( "Text" ), UnescapeString( GetText() ) );
|
aList.emplace_back( _( "Text" ), UnescapeString( GetText() ) );
|
||||||
@ -280,7 +285,7 @@ void FP_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITE
|
|||||||
wxASSERT( m_Type >= TEXT_is_REFERENCE && m_Type <= TEXT_is_DIVERS );
|
wxASSERT( m_Type >= TEXT_is_REFERENCE && m_Type <= TEXT_is_DIVERS );
|
||||||
aList.emplace_back( _( "Type" ), text_type_msg[m_Type] );
|
aList.emplace_back( _( "Type" ), text_type_msg[m_Type] );
|
||||||
|
|
||||||
if( IsLocked() )
|
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() )
|
||||||
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
||||||
|
|
||||||
aList.emplace_back( _( "Display" ), IsVisible() ? _( "Yes" ) : _( "No" ) );
|
aList.emplace_back( _( "Display" ), IsVisible() ? _( "Yes" ) : _( "No" ) );
|
||||||
|
@ -156,7 +156,7 @@ bool PAD::CanHaveNumber() const
|
|||||||
|
|
||||||
bool PAD::IsLocked() const
|
bool PAD::IsLocked() const
|
||||||
{
|
{
|
||||||
if( GetParent() && static_cast<FOOTPRINT*>( GetParent() )->IsLocked() )
|
if( GetParent() && GetParent()->IsLocked() )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return BOARD_ITEM::IsLocked();
|
return BOARD_ITEM::IsLocked();
|
||||||
@ -866,8 +866,11 @@ void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>&
|
|||||||
wxString msg;
|
wxString msg;
|
||||||
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_parent );
|
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( m_parent );
|
||||||
|
|
||||||
|
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME )
|
||||||
|
{
|
||||||
if( parentFootprint )
|
if( parentFootprint )
|
||||||
aList.emplace_back( _( "Footprint" ), parentFootprint->GetReference() );
|
aList.emplace_back( _( "Footprint" ), parentFootprint->GetReference() );
|
||||||
|
}
|
||||||
|
|
||||||
aList.emplace_back( _( "Pad" ), m_number );
|
aList.emplace_back( _( "Pad" ), m_number );
|
||||||
|
|
||||||
@ -877,12 +880,15 @@ void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>&
|
|||||||
if( !GetPinType().IsEmpty() )
|
if( !GetPinType().IsEmpty() )
|
||||||
aList.emplace_back( _( "Pin Type" ), GetPinType() );
|
aList.emplace_back( _( "Pin Type" ), GetPinType() );
|
||||||
|
|
||||||
|
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME )
|
||||||
|
{
|
||||||
aList.emplace_back( _( "Net" ), UnescapeString( GetNetname() ) );
|
aList.emplace_back( _( "Net" ), UnescapeString( GetNetname() ) );
|
||||||
|
|
||||||
aList.emplace_back( _( "Net Class" ), UnescapeString( GetNetClass()->GetName() ) );
|
aList.emplace_back( _( "Net Class" ), UnescapeString( GetNetClass()->GetName() ) );
|
||||||
|
|
||||||
if( IsLocked() )
|
if( IsLocked() )
|
||||||
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
||||||
|
}
|
||||||
|
|
||||||
if( GetAttribute() == PAD_ATTRIB::SMD || GetAttribute() == PAD_ATTRIB::CONN )
|
if( GetAttribute() == PAD_ATTRIB::SMD || GetAttribute() == PAD_ATTRIB::CONN )
|
||||||
aList.emplace_back( _( "Layer" ), layerMaskDescribe() );
|
aList.emplace_back( _( "Layer" ), layerMaskDescribe() );
|
||||||
@ -954,9 +960,13 @@ void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>&
|
|||||||
wxString source;
|
wxString source;
|
||||||
int clearance = GetOwnClearance( GetLayer(), &source );
|
int clearance = GetOwnClearance( GetLayer(), &source );
|
||||||
|
|
||||||
|
if( !source.IsEmpty() )
|
||||||
|
{
|
||||||
aList.emplace_back( wxString::Format( _( "Min Clearance: %s" ),
|
aList.emplace_back( wxString::Format( _( "Min Clearance: %s" ),
|
||||||
MessageTextFromValue( units, clearance ) ),
|
MessageTextFromValue( units, clearance ) ),
|
||||||
wxString::Format( _( "(from %s)" ), source ) );
|
wxString::Format( _( "(from %s)" ),
|
||||||
|
source ) );
|
||||||
|
}
|
||||||
#if 0
|
#if 0
|
||||||
// useful for debug only
|
// useful for debug only
|
||||||
aList.emplace_back( "UUID", m_Uuid.AsString() );
|
aList.emplace_back( "UUID", m_Uuid.AsString() );
|
||||||
|
@ -347,7 +347,7 @@ void PCB_DIMENSION_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame,
|
|||||||
aList.emplace_back( start, end );
|
aList.emplace_back( start, end );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( IsLocked() )
|
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() )
|
||||||
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
||||||
|
|
||||||
aList.emplace_back( _( "Layer" ), GetLayerName() );
|
aList.emplace_back( _( "Layer" ), GetLayerName() );
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
#include <bitmaps.h>
|
#include <bitmaps.h>
|
||||||
|
#include <eda_draw_frame.h>
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
#include <board_item.h>
|
#include <board_item.h>
|
||||||
#include <pcb_group.h>
|
#include <pcb_group.h>
|
||||||
@ -334,7 +335,7 @@ void PCB_GROUP::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
|
|||||||
aList.emplace_back( _( "Group" ), m_name.empty() ? _( "<unnamed>" ) : m_name );
|
aList.emplace_back( _( "Group" ), m_name.empty() ? _( "<unnamed>" ) : m_name );
|
||||||
aList.emplace_back( _( "Members" ), wxString::Format( "%zu", m_items.size() ) );
|
aList.emplace_back( _( "Members" ), wxString::Format( "%zu", m_items.size() ) );
|
||||||
|
|
||||||
if( IsLocked() )
|
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() )
|
||||||
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ void PCB_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
|
|||||||
{
|
{
|
||||||
aList.emplace_back( _( "Type" ), _( "Drawing" ) );
|
aList.emplace_back( _( "Type" ), _( "Drawing" ) );
|
||||||
|
|
||||||
if( IsLocked() )
|
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() )
|
||||||
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
||||||
|
|
||||||
ShapeGetMsgPanelInfo( aFrame, aList );
|
ShapeGetMsgPanelInfo( aFrame, aList );
|
||||||
|
@ -114,7 +114,7 @@ void PCB_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
|||||||
// Don't use GetShownText() here; we want to show the user the variable references
|
// Don't use GetShownText() here; we want to show the user the variable references
|
||||||
aList.emplace_back( _( "PCB Text" ), UnescapeString( GetText() ) );
|
aList.emplace_back( _( "PCB Text" ), UnescapeString( GetText() ) );
|
||||||
|
|
||||||
if( IsLocked() )
|
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() )
|
||||||
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
||||||
|
|
||||||
aList.emplace_back( _( "Layer" ), GetLayerName() );
|
aList.emplace_back( _( "Layer" ), GetLayerName() );
|
||||||
|
@ -803,8 +803,8 @@ void PCB_TRACK::GetMsgPanelInfoBase_Common( EDA_DRAW_FRAME* aFrame,
|
|||||||
m_End.y ) );
|
m_End.y ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Display the State member
|
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() )
|
||||||
aList.emplace_back( _( "Status" ), IsLocked() ? _( "Locked" ) : wxT( "" ) );
|
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -589,17 +589,23 @@ void ZONE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>&
|
|||||||
aList.emplace_back( MSG_PANEL_ITEM( _( "Restrictions" ), msg ) );
|
aList.emplace_back( MSG_PANEL_ITEM( _( "Restrictions" ), msg ) );
|
||||||
}
|
}
|
||||||
else if( IsOnCopperLayer() )
|
else if( IsOnCopperLayer() )
|
||||||
|
{
|
||||||
|
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME )
|
||||||
{
|
{
|
||||||
aList.emplace_back( _( "Net" ), UnescapeString( GetNetname() ) );
|
aList.emplace_back( _( "Net" ), UnescapeString( GetNetname() ) );
|
||||||
|
|
||||||
aList.emplace_back( _( "Net Class" ), UnescapeString( GetNetClass()->GetName() ) );
|
aList.emplace_back( _( "Net Class" ), UnescapeString( GetNetClass()->GetName() ) );
|
||||||
|
}
|
||||||
|
|
||||||
// Display priority level
|
// Display priority level
|
||||||
aList.emplace_back( _( "Priority" ), wxString::Format( "%d", GetPriority() ) );
|
aList.emplace_back( _( "Priority" ), wxString::Format( "%d", GetPriority() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME )
|
||||||
|
{
|
||||||
if( IsLocked() )
|
if( IsLocked() )
|
||||||
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
||||||
|
}
|
||||||
|
|
||||||
wxString layerDesc;
|
wxString layerDesc;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
@ -635,9 +641,13 @@ void ZONE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>&
|
|||||||
wxString source;
|
wxString source;
|
||||||
int clearance = GetOwnClearance( GetLayer(), &source );
|
int clearance = GetOwnClearance( GetLayer(), &source );
|
||||||
|
|
||||||
|
if( !source.IsEmpty() )
|
||||||
|
{
|
||||||
aList.emplace_back( wxString::Format( _( "Min Clearance: %s" ),
|
aList.emplace_back( wxString::Format( _( "Min Clearance: %s" ),
|
||||||
MessageTextFromValue( units, clearance ) ),
|
MessageTextFromValue( units, clearance ) ),
|
||||||
wxString::Format( _( "(from %s)" ), source ) );
|
wxString::Format( _( "(from %s)" ),
|
||||||
|
source ) );
|
||||||
|
}
|
||||||
|
|
||||||
// Useful for statistics, especially when zones are complex the number of hatches
|
// Useful for statistics, especially when zones are complex the number of hatches
|
||||||
// and filled polygons can explain the display and DRC calculation time:
|
// and filled polygons can explain the display and DRC calculation time:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user