Implement locking for graphic shapes.

Fixes https://gitlab.com/kicad/code/kicad/issues/6972
This commit is contained in:
Jeff Young 2021-01-07 17:35:27 +00:00
parent 6ca9a42251
commit 01fe3b91e9
15 changed files with 511 additions and 334 deletions

View File

@ -248,8 +248,7 @@ public:
*/ */
virtual bool IsLocked() const virtual bool IsLocked() const
{ {
// only footprints & TRACKs can be locked at this time. return GetState( LOCKED );
return false;
} }
/** /**
@ -257,7 +256,7 @@ public:
*/ */
virtual void SetLocked( bool aLocked ) virtual void SetLocked( bool aLocked )
{ {
// only footprints & TRACKs can be locked at this time. SetState( LOCKED, aLocked );
} }
/** /**

View File

@ -117,8 +117,8 @@ typedef const INSPECTOR_FUNC& INSPECTOR;
#define SKIP_STRUCT (1 << 15) ///< flag indicating that the structure should be ignored #define SKIP_STRUCT (1 << 15) ///< flag indicating that the structure should be ignored
#define DO_NOT_DRAW (1 << 16) ///< Used to disable draw function #define DO_NOT_DRAW (1 << 16) ///< Used to disable draw function
#define IS_PASTED (1 << 17) ///< Modifier on IS_NEW which indicates it came from clipboard #define IS_PASTED (1 << 17) ///< Modifier on IS_NEW which indicates it came from clipboard
#define TRACK_LOCKED (1 << 18) ///< Pcbnew: track locked: protected from global deletion #define LOCKED (1 << 18) ///< Pcbnew: locked from movement and deletion
#define TRACK_AR (1 << 19) ///< Pcbnew: autorouted track #define UNUSED (1 << 19)
#define MALFORMED_F_COURTYARD (1 << 20) #define MALFORMED_F_COURTYARD (1 << 20)
#define MALFORMED_B_COURTYARD (1 << 21) #define MALFORMED_B_COURTYARD (1 << 21)
#define MALFORMED_COURTYARDS ( MALFORMED_F_COURTYARD | MALFORMED_B_COURTYARD ) #define MALFORMED_COURTYARDS ( MALFORMED_F_COURTYARD | MALFORMED_B_COURTYARD )
@ -133,7 +133,7 @@ typedef const INSPECTOR_FUNC& INSPECTOR;
#define UR_TRANSIENT (1 << 28) ///< indicates the item is owned by the undo/redo stack #define UR_TRANSIENT (1 << 28) ///< indicates the item is owned by the undo/redo stack
#define IS_DANGLING (1 << 29) ///< indicates a pin is dangling #define IS_DANGLING (1 << 29) ///< indicates a pin is dangling
#define ENTERED (1 << 30) #define ENTERED (1 << 30) ///< indicates a group has been entered
// WARNING: if you add flags, you'll probably need to adjust the masks in GetEditFlags() and // WARNING: if you add flags, you'll probably need to adjust the masks in GetEditFlags() and
// ClearTempFlags(). // ClearTempFlags().

View File

@ -43,12 +43,13 @@ DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION( PCB_EDIT_FRAME* parent ) :
{ {
m_Parent = parent; m_Parent = parent;
m_currentLayer = F_Cu; m_currentLayer = F_Cu;
m_TrackFilterAR->Enable( m_DelTracks->GetValue() ); m_trackFilterLocked->Enable( m_delTracks->GetValue() );
m_TrackFilterLocked->Enable( m_DelTracks->GetValue() ); m_trackFilterUnlocked->Enable( m_delTracks->GetValue() );
m_TrackFilterNormal->Enable( m_DelTracks->GetValue() ); m_trackFilterVias->Enable( m_delTracks->GetValue() );
m_TrackFilterVias->Enable( m_DelTracks->GetValue() ); m_footprintFilterLocked->Enable( m_delFootprints->GetValue() );
m_ModuleFilterLocked->Enable( m_DelModules->GetValue() ); m_footprintFilterUnlocked->Enable( m_delFootprints->GetValue() );
m_ModuleFilterNormal->Enable( m_DelModules->GetValue() ); m_drawingFilterLocked->Enable( m_delDrawings->GetValue() );
m_drawingFilterUnlocked->Enable( m_delDrawings->GetValue() );
m_sdbSizer1OK->SetDefault(); m_sdbSizer1OK->SetDefault();
SetFocus(); SetFocus();
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
@ -74,23 +75,29 @@ void DIALOG_GLOBAL_DELETION::SetCurrentLayer( LAYER_NUM aLayer )
} }
void DIALOG_GLOBAL_DELETION::OnCheckDeleteTracks( wxCommandEvent& event ) void DIALOG_GLOBAL_DELETION::onCheckDeleteTracks( wxCommandEvent& event )
{ {
m_TrackFilterAR->Enable( m_DelTracks->GetValue() ); m_trackFilterLocked->Enable( m_delTracks->GetValue() );
m_TrackFilterLocked->Enable( m_DelTracks->GetValue() ); m_trackFilterUnlocked->Enable( m_delTracks->GetValue() );
m_TrackFilterNormal->Enable( m_DelTracks->GetValue() ); m_trackFilterVias->Enable( m_delTracks->GetValue() );
m_TrackFilterVias->Enable( m_DelTracks->GetValue() );
} }
void DIALOG_GLOBAL_DELETION::OnCheckDeleteModules( wxCommandEvent& event ) void DIALOG_GLOBAL_DELETION::onCheckDeleteFootprints( wxCommandEvent& event )
{ {
m_ModuleFilterLocked->Enable( m_DelModules->GetValue() ); m_footprintFilterLocked->Enable( m_delFootprints->GetValue() );
m_ModuleFilterNormal->Enable( m_DelModules->GetValue() ); m_footprintFilterUnlocked->Enable( m_delFootprints->GetValue() );
} }
void DIALOG_GLOBAL_DELETION::AcceptPcbDelete() void DIALOG_GLOBAL_DELETION::onCheckDeleteDrawings( wxCommandEvent& event )
{
m_drawingFilterLocked->Enable( m_delDrawings->GetValue() );
m_drawingFilterUnlocked->Enable( m_delDrawings->GetValue() );
}
void DIALOG_GLOBAL_DELETION::acceptPcbDelete()
{ {
bool gen_rastnest = false; bool gen_rastnest = false;
@ -99,7 +106,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete()
bool delAll = false; bool delAll = false;
if( m_DelAlls->GetValue() ) if( m_delAll->GetValue() )
{ {
if( !IsOK( this, _( "Are you sure you want to delete the entire board?" ) ) ) if( !IsOK( this, _( "Are you sure you want to delete the entire board?" ) ) )
return; return;
@ -117,7 +124,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete()
if( m_rbLayersOption->GetSelection() != 0 ) // Use current layer only if( m_rbLayersOption->GetSelection() != 0 ) // Use current layer only
layers_filter = LSET( ToLAYER_ID( m_currentLayer ) ); layers_filter = LSET( ToLAYER_ID( m_currentLayer ) );
if( delAll || m_DelZones->GetValue() ) if( delAll || m_delZones->GetValue() )
{ {
int area_index = 0; int area_index = 0;
auto item = pcb->GetArea( area_index ); auto item = pcb->GetArea( area_index );
@ -135,8 +142,8 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete()
} }
} }
bool delDrawings = m_DelDrawings->GetValue() || m_DelBoardEdges->GetValue(); bool delDrawings = m_delDrawings->GetValue() || m_delBoardEdges->GetValue();
bool delTexts = m_DelTexts->GetValue(); bool delTexts = m_delTexts->GetValue();
if( delAll || delDrawings || delTexts ) if( delAll || delDrawings || delTexts )
{ {
@ -146,70 +153,82 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete()
// Layer mask for drawings // Layer mask for drawings
LSET masque_layer; LSET masque_layer;
if( m_DelDrawings->GetValue() ) if( m_delDrawings->GetValue() )
masque_layer = LSET::AllNonCuMask().set( Edge_Cuts, false ); masque_layer = LSET::AllNonCuMask().set( Edge_Cuts, false );
if( m_DelBoardEdges->GetValue() ) if( m_delBoardEdges->GetValue() )
masque_layer.set( Edge_Cuts ); masque_layer.set( Edge_Cuts );
masque_layer &= layers_filter; masque_layer &= layers_filter;
for( auto dwg : pcb->Drawings() ) for( BOARD_ITEM* dwg : pcb->Drawings() )
{ {
KICAD_T type = dwg->Type(); KICAD_T type = dwg->Type();
LAYER_NUM layer = dwg->GetLayer(); LAYER_NUM layer = dwg->GetLayer();
if( delAll if( !delAll )
|| ( type == PCB_SHAPE_T && delDrawings && masque_layer[layer] )
|| ( type == PCB_TEXT_T && delTexts && del_text_layers[layer] ) )
{ {
commit.Remove( dwg ); if( type == PCB_SHAPE_T )
{
if( !delDrawings || !masque_layer[layer] )
continue;
if( dwg->IsLocked() && !m_drawingFilterLocked->GetValue() )
continue;
if( !dwg->IsLocked() && !m_drawingFilterUnlocked->GetValue() )
continue;
}
else if( type == PCB_TEXT_T )
{
if( !delTexts || !del_text_layers[layer] )
continue;
}
} }
commit.Remove( dwg );
} }
} }
if( delAll || m_DelModules->GetValue() ) if( delAll || m_delFootprints->GetValue() )
{ {
for( FOOTPRINT* item : pcb->Footprints() ) for( FOOTPRINT* footprint : pcb->Footprints() )
{ {
bool del_fp = delAll; bool del_fp = delAll;
if( layers_filter[item->GetLayer()] && if( !delAll )
( ( m_ModuleFilterNormal->GetValue() && !item->IsLocked() ) ||
( m_ModuleFilterLocked->GetValue() && item->IsLocked() ) ) )
del_fp = true;
if( del_fp )
{ {
commit.Remove( item ); if( footprint->IsLocked() && !m_footprintFilterLocked->GetValue() )
gen_rastnest = true; continue;
if( !footprint->IsLocked() && !m_footprintFilterUnlocked->GetValue() )
continue;
if( !layers_filter[footprint->GetLayer()] )
continue;
} }
commit.Remove( footprint );
gen_rastnest = true;
} }
} }
if( delAll || m_DelTracks->GetValue() ) if( delAll || m_delTracks->GetValue() )
{ {
STATUS_FLAGS track_mask_filter = 0; for( TRACK* track : pcb->Tracks() )
if( !m_TrackFilterLocked->GetValue() )
track_mask_filter |= TRACK_LOCKED;
if( !m_TrackFilterAR->GetValue() )
track_mask_filter |= TRACK_AR;
for( auto track : pcb->Tracks() )
{ {
if( !delAll ) if( !delAll )
{ {
if( ( track->GetState( TRACK_LOCKED | TRACK_AR ) & track_mask_filter ) != 0 ) if( track->Type() == PCB_TRACE_T )
continue; {
if( track->IsLocked() && !m_trackFilterLocked->GetValue() )
continue;
if( ( track->Type() == PCB_TRACE_T ) && if( !track->IsLocked() && !m_trackFilterUnlocked->GetValue() )
( track->GetState( TRACK_LOCKED | TRACK_AR ) == 0 ) && continue;
!m_TrackFilterNormal->GetValue() ) }
continue;
if( ( track->Type() == PCB_VIA_T ) && !m_TrackFilterVias->GetValue() ) if( ( track->Type() == PCB_VIA_T ) && !m_trackFilterVias->GetValue() )
continue; continue;
if( ( track->GetLayerSet() & layers_filter ) == 0 ) if( ( track->GetLayerSet() & layers_filter ) == 0 )
@ -223,7 +242,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete()
commit.Push( "Global delete" ); commit.Push( "Global delete" );
if( m_DelMarkers->GetValue() ) if( m_delMarkers->GetValue() )
pcb->DeleteMARKERs(); pcb->DeleteMARKERs();
if( gen_rastnest ) if( gen_rastnest )

View File

@ -36,20 +36,21 @@ private:
PCB_EDIT_FRAME* m_Parent; PCB_EDIT_FRAME* m_Parent;
LAYER_NUM m_currentLayer; LAYER_NUM m_currentLayer;
void OnOkClick( wxCommandEvent& event ) override void onOkClick( wxCommandEvent& event ) override
{ {
AcceptPcbDelete(); acceptPcbDelete();
EndModal(wxID_OK); EndModal(wxID_OK);
} }
void OnCancelClick( wxCommandEvent& event ) override void onCancelClick( wxCommandEvent& event ) override
{ {
EndModal(wxID_CANCEL); EndModal(wxID_CANCEL);
} }
void AcceptPcbDelete(); void acceptPcbDelete();
void OnCheckDeleteTracks( wxCommandEvent& event ) override; void onCheckDeleteTracks( wxCommandEvent& event ) override;
void OnCheckDeleteModules( wxCommandEvent& event ) override; void onCheckDeleteFootprints( wxCommandEvent& event ) override;
void onCheckDeleteDrawings( wxCommandEvent& event ) override;
}; };
#endif // _DIALOG_GLOBAL_DELETION_H_ #endif // _DIALOG_GLOBAL_DELETION_H_

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 18 2020) // 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!
@ -22,29 +22,29 @@ DIALOG_GLOBAL_DELETION_BASE::DIALOG_GLOBAL_DELETION_BASE( wxWindow* parent, wxWi
wxStaticBoxSizer* sbSizerLeft; wxStaticBoxSizer* sbSizerLeft;
sbSizerLeft = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Items to Delete") ), wxVERTICAL ); sbSizerLeft = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Items to Delete") ), wxVERTICAL );
m_DelZones = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Zones"), wxDefaultPosition, wxDefaultSize, 0 ); m_delZones = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Zones"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerLeft->Add( m_DelZones, 0, wxALL, 5 ); sbSizerLeft->Add( m_delZones, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_DelTexts = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Text"), wxDefaultPosition, wxDefaultSize, 0 ); m_delTexts = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Text"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerLeft->Add( m_DelTexts, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); sbSizerLeft->Add( m_delTexts, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_DelBoardEdges = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Board outlines"), wxDefaultPosition, wxDefaultSize, 0 ); m_delBoardEdges = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Board outlines"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerLeft->Add( m_DelBoardEdges, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); sbSizerLeft->Add( m_delBoardEdges, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_DelDrawings = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Drawings"), wxDefaultPosition, wxDefaultSize, 0 ); m_delDrawings = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Graphics"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerLeft->Add( m_DelDrawings, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); sbSizerLeft->Add( m_delDrawings, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_DelModules = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Footprints"), wxDefaultPosition, wxDefaultSize, 0 ); m_delFootprints = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Footprints"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerLeft->Add( m_DelModules, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); sbSizerLeft->Add( m_delFootprints, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_DelTracks = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Tracks"), wxDefaultPosition, wxDefaultSize, 0 ); m_delTracks = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Tracks && vias"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerLeft->Add( m_DelTracks, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); sbSizerLeft->Add( m_delTracks, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_DelMarkers = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Markers"), wxDefaultPosition, wxDefaultSize, 0 ); m_delMarkers = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Markers"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerLeft->Add( m_DelMarkers, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); sbSizerLeft->Add( m_delMarkers, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_DelAlls = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Clear board"), wxDefaultPosition, wxDefaultSize, 0 ); m_delAll = new wxCheckBox( sbSizerLeft->GetStaticBox(), wxID_ANY, _("Clear board"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizerLeft->Add( m_DelAlls, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); sbSizerLeft->Add( m_delAll, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
bSizerUpper->Add( sbSizerLeft, 0, wxEXPAND|wxALL, 5 ); bSizerUpper->Add( sbSizerLeft, 0, wxEXPAND|wxALL, 5 );
@ -54,27 +54,29 @@ DIALOG_GLOBAL_DELETION_BASE::DIALOG_GLOBAL_DELETION_BASE( wxWindow* parent, wxWi
sbFilter = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Filter Settings") ), wxVERTICAL ); sbFilter = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Filter Settings") ), wxVERTICAL );
m_TrackFilterAR = new wxCheckBox( sbFilter->GetStaticBox(), wxID_ANY, _("Automatically routed tracks"), wxDefaultPosition, wxDefaultSize, 0 ); m_drawingFilterLocked = new wxCheckBox( sbFilter->GetStaticBox(), wxID_ANY, _("Locked graphics"), wxDefaultPosition, wxDefaultSize, 0 );
m_TrackFilterAR->SetValue(true); sbFilter->Add( m_drawingFilterLocked, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
sbFilter->Add( m_TrackFilterAR, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_TrackFilterLocked = new wxCheckBox( sbFilter->GetStaticBox(), wxID_ANY, _("Locked tracks"), wxDefaultPosition, wxDefaultSize, 0 ); m_drawingFilterUnlocked = new wxCheckBox( sbFilter->GetStaticBox(), wxID_ANY, _("Unlocked graphics"), wxDefaultPosition, wxDefaultSize, 0 );
sbFilter->Add( m_TrackFilterLocked, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); sbFilter->Add( m_drawingFilterUnlocked, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_TrackFilterNormal = new wxCheckBox( sbFilter->GetStaticBox(), wxID_ANY, _("Unlocked tracks"), wxDefaultPosition, wxDefaultSize, 0 ); m_footprintFilterLocked = new wxCheckBox( sbFilter->GetStaticBox(), wxID_ANY, _("Locked footprints"), wxDefaultPosition, wxDefaultSize, 0 );
m_TrackFilterNormal->SetValue(true); sbFilter->Add( m_footprintFilterLocked, 0, wxALL, 5 );
sbFilter->Add( m_TrackFilterNormal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_TrackFilterVias = new wxCheckBox( sbFilter->GetStaticBox(), wxID_ANY, _("Vias"), wxDefaultPosition, wxDefaultSize, 0 ); m_footprintFilterUnlocked = new wxCheckBox( sbFilter->GetStaticBox(), wxID_ANY, _("Unlocked footprints"), wxDefaultPosition, wxDefaultSize, 0 );
m_TrackFilterVias->SetValue(true); m_footprintFilterUnlocked->SetValue(true);
sbFilter->Add( m_TrackFilterVias, 0, wxALL, 5 ); sbFilter->Add( m_footprintFilterUnlocked, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_ModuleFilterLocked = new wxCheckBox( sbFilter->GetStaticBox(), wxID_ANY, _("Locked footprints"), wxDefaultPosition, wxDefaultSize, 0 ); m_trackFilterLocked = new wxCheckBox( sbFilter->GetStaticBox(), wxID_ANY, _("Locked tracks"), wxDefaultPosition, wxDefaultSize, 0 );
sbFilter->Add( m_ModuleFilterLocked, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); sbFilter->Add( m_trackFilterLocked, 0, wxALL, 5 );
m_ModuleFilterNormal = new wxCheckBox( sbFilter->GetStaticBox(), wxID_ANY, _("Unlocked footprints"), wxDefaultPosition, wxDefaultSize, 0 ); m_trackFilterUnlocked = new wxCheckBox( sbFilter->GetStaticBox(), wxID_ANY, _("Unlocked tracks"), wxDefaultPosition, wxDefaultSize, 0 );
m_ModuleFilterNormal->SetValue(true); m_trackFilterUnlocked->SetValue(true);
sbFilter->Add( m_ModuleFilterNormal, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); sbFilter->Add( m_trackFilterUnlocked, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_trackFilterVias = new wxCheckBox( sbFilter->GetStaticBox(), wxID_ANY, _("Vias"), wxDefaultPosition, wxDefaultSize, 0 );
m_trackFilterVias->SetValue(true);
sbFilter->Add( m_trackFilterVias, 0, wxRIGHT|wxLEFT, 5 );
bSizerRight->Add( sbFilter, 0, wxALL|wxEXPAND, 5 ); bSizerRight->Add( sbFilter, 0, wxALL|wxEXPAND, 5 );
@ -89,7 +91,7 @@ DIALOG_GLOBAL_DELETION_BASE::DIALOG_GLOBAL_DELETION_BASE( wxWindow* parent, wxWi
bSizerUpper->Add( bSizerRight, 0, wxEXPAND, 5 ); bSizerUpper->Add( bSizerRight, 0, wxEXPAND, 5 );
bSizerMain->Add( bSizerUpper, 1, wxALL|wxEXPAND, 5 ); bSizerMain->Add( bSizerUpper, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
wxFlexGridSizer* fgSizer1; wxFlexGridSizer* fgSizer1;
fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 ); fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
@ -105,10 +107,10 @@ DIALOG_GLOBAL_DELETION_BASE::DIALOG_GLOBAL_DELETION_BASE( wxWindow* parent, wxWi
fgSizer1->Add( m_textCtrlCurrLayer, 0, wxEXPAND|wxALL|wxALIGN_CENTER_VERTICAL, 5 ); fgSizer1->Add( m_textCtrlCurrLayer, 0, wxEXPAND|wxALL|wxALIGN_CENTER_VERTICAL, 5 );
bSizerMain->Add( fgSizer1, 0, wxEXPAND, 5 ); bSizerMain->Add( fgSizer1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline1, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 ); bSizerMain->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer(); m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK ); m_sdbSizer1OK = new wxButton( this, wxID_OK );
@ -127,18 +129,20 @@ DIALOG_GLOBAL_DELETION_BASE::DIALOG_GLOBAL_DELETION_BASE( wxWindow* parent, wxWi
this->Centre( wxBOTH ); this->Centre( wxBOTH );
// Connect Events // Connect Events
m_DelModules->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::OnCheckDeleteModules ), NULL, this ); m_delDrawings->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteDrawings ), NULL, this );
m_DelTracks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::OnCheckDeleteTracks ), NULL, this ); m_delFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteFootprints ), NULL, this );
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::OnCancelClick ), NULL, this ); m_delTracks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteTracks ), NULL, this );
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::OnOkClick ), NULL, this ); m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCancelClick ), NULL, this );
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onOkClick ), NULL, this );
} }
DIALOG_GLOBAL_DELETION_BASE::~DIALOG_GLOBAL_DELETION_BASE() DIALOG_GLOBAL_DELETION_BASE::~DIALOG_GLOBAL_DELETION_BASE()
{ {
// Disconnect Events // Disconnect Events
m_DelModules->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::OnCheckDeleteModules ), NULL, this ); m_delDrawings->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteDrawings ), NULL, this );
m_DelTracks->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::OnCheckDeleteTracks ), NULL, this ); m_delFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteFootprints ), NULL, this );
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::OnCancelClick ), NULL, this ); m_delTracks->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteTracks ), NULL, this );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::OnOkClick ), NULL, this ); m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCancelClick ), NULL, this );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onOkClick ), NULL, this );
} }

View File

@ -14,7 +14,6 @@
<property name="file">dialog_global_deletion_base</property> <property name="file">dialog_global_deletion_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_global_deletion</property> <property name="name">dialog_global_deletion</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">0</property> <property name="use_enum">0</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">
@ -62,7 +60,7 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -83,7 +81,7 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -122,7 +120,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_DelZones</property> <property name="name">m_delZones</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -186,7 +184,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_DelTexts</property> <property name="name">m_delTexts</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -250,7 +248,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_DelBoardEdges</property> <property name="name">m_delBoardEdges</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -306,7 +304,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Drawings</property> <property name="label">Graphics</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -314,7 +312,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_DelDrawings</property> <property name="name">m_delDrawings</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -335,6 +333,7 @@
<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>
<event name="OnCheckBox">onCheckDeleteDrawings</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
@ -378,7 +377,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_DelModules</property> <property name="name">m_delFootprints</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -399,7 +398,7 @@
<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>
<event name="OnCheckBox">OnCheckDeleteModules</event> <event name="OnCheckBox">onCheckDeleteFootprints</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
@ -435,7 +434,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Tracks</property> <property name="label">Tracks &amp;&amp; vias</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -443,7 +442,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_DelTracks</property> <property name="name">m_delTracks</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -464,7 +463,7 @@
<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>
<event name="OnCheckBox">OnCheckDeleteTracks</event> <event name="OnCheckBox">onCheckDeleteTracks</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
@ -508,7 +507,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_DelMarkers</property> <property name="name">m_delMarkers</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -572,7 +571,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_DelAlls</property> <property name="name">m_delAll</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -620,71 +619,7 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">1</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Automatically routed tracks</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_TrackFilterAR</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -715,7 +650,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Locked tracks</property> <property name="label">Locked graphics</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -723,7 +658,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_TrackFilterLocked</property> <property name="name">m_drawingFilterLocked</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -734,7 +669,7 @@
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
@ -748,7 +683,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property> <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -764,7 +699,7 @@
<property name="caption"></property> <property name="caption"></property>
<property name="caption_visible">1</property> <property name="caption_visible">1</property>
<property name="center_pane">0</property> <property name="center_pane">0</property>
<property name="checked">1</property> <property name="checked">0</property>
<property name="close_button">1</property> <property name="close_button">1</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="context_menu">1</property> <property name="context_menu">1</property>
@ -779,7 +714,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Unlocked tracks</property> <property name="label">Unlocked graphics</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -787,7 +722,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_TrackFilterNormal</property> <property name="name">m_drawingFilterUnlocked</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -798,7 +733,7 @@
<property name="show">1</property> <property name="show">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property> <property name="toolbar_pane">0</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
@ -814,70 +749,6 @@
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL</property> <property name="flag">wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">1</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Vias</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_TrackFilterVias</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
<property name="LeftDockable">1</property> <property name="LeftDockable">1</property>
@ -915,7 +786,7 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_ModuleFilterLocked</property> <property name="name">m_footprintFilterLocked</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -979,7 +850,199 @@
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_ModuleFilterNormal</property> <property name="name">m_footprintFilterUnlocked</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Locked tracks</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_trackFilterLocked</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">1</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Unlocked tracks</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_trackFilterUnlocked</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">1</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Vias</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_trackFilterVias</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
<property name="pane_position"></property> <property name="pane_position"></property>
<property name="pane_size"></property> <property name="pane_size"></property>
@ -1076,7 +1139,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="1"> <object class="wxFlexGridSizer" expanded="1">
<property name="cols">2</property> <property name="cols">2</property>
@ -1219,7 +1282,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property> <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticLine" expanded="1"> <object class="wxStaticLine" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -1291,8 +1354,8 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">m_sdbSizer1</property> <property name="name">m_sdbSizer1</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<event name="OnCancelButtonClick">OnCancelClick</event> <event name="OnCancelButtonClick">onCancelClick</event>
<event name="OnOKButtonClick">OnOkClick</event> <event name="OnOKButtonClick">onOkClick</event>
</object> </object>
</object> </object>
</object> </object>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 18 2020) // 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!
@ -37,21 +37,22 @@ class DIALOG_GLOBAL_DELETION_BASE : public DIALOG_SHIM
private: private:
protected: protected:
wxCheckBox* m_DelZones; wxCheckBox* m_delZones;
wxCheckBox* m_DelTexts; wxCheckBox* m_delTexts;
wxCheckBox* m_DelBoardEdges; wxCheckBox* m_delBoardEdges;
wxCheckBox* m_DelDrawings; wxCheckBox* m_delDrawings;
wxCheckBox* m_DelModules; wxCheckBox* m_delFootprints;
wxCheckBox* m_DelTracks; wxCheckBox* m_delTracks;
wxCheckBox* m_DelMarkers; wxCheckBox* m_delMarkers;
wxCheckBox* m_DelAlls; wxCheckBox* m_delAll;
wxStaticBoxSizer* sbFilter; wxStaticBoxSizer* sbFilter;
wxCheckBox* m_TrackFilterAR; wxCheckBox* m_drawingFilterLocked;
wxCheckBox* m_TrackFilterLocked; wxCheckBox* m_drawingFilterUnlocked;
wxCheckBox* m_TrackFilterNormal; wxCheckBox* m_footprintFilterLocked;
wxCheckBox* m_TrackFilterVias; wxCheckBox* m_footprintFilterUnlocked;
wxCheckBox* m_ModuleFilterLocked; wxCheckBox* m_trackFilterLocked;
wxCheckBox* m_ModuleFilterNormal; wxCheckBox* m_trackFilterUnlocked;
wxCheckBox* m_trackFilterVias;
wxRadioBox* m_rbLayersOption; wxRadioBox* m_rbLayersOption;
wxStaticText* m_staticText1; wxStaticText* m_staticText1;
wxTextCtrl* m_textCtrlCurrLayer; wxTextCtrl* m_textCtrlCurrLayer;
@ -61,10 +62,11 @@ class DIALOG_GLOBAL_DELETION_BASE : public DIALOG_SHIM
wxButton* m_sdbSizer1Cancel; wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnCheckDeleteModules( wxCommandEvent& event ) { event.Skip(); } virtual void onCheckDeleteDrawings( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCheckDeleteTracks( wxCommandEvent& event ) { event.Skip(); } virtual void onCheckDeleteFootprints( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void onCheckDeleteTracks( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } virtual void onCancelClick( wxCommandEvent& event ) { event.Skip(); }
virtual void onOkClick( wxCommandEvent& event ) { event.Skip(); }
public: public:

View File

@ -270,6 +270,7 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow()
m_bezierCtrl2Y.SetValue( m_item->GetBezControl2().y ); m_bezierCtrl2Y.SetValue( m_item->GetBezControl2().y );
m_filledCtrl->SetValue( m_item->IsFilled() ); m_filledCtrl->SetValue( m_item->IsFilled() );
m_locked->SetValue( m_item->IsLocked() );
m_thickness.SetValue( m_item->GetWidth() ); m_thickness.SetValue( m_item->GetWidth() );
m_LayerSelectionCtrl->SetLayerSelection( m_item->GetLayer() ); m_LayerSelectionCtrl->SetLayerSelection( m_item->GetLayer() );
@ -359,6 +360,7 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow()
} }
m_item->SetFilled( m_filledCtrl->GetValue() ); m_item->SetFilled( m_filledCtrl->GetValue() );
m_item->SetLocked( m_locked->GetValue() );
m_item->SetWidth( m_thickness.GetValue() ); m_item->SetWidth( m_thickness.GetValue() );
m_item->SetLayer( ToLAYER_ID( layer ) ); m_item->SetLayer( ToLAYER_ID( layer ) );

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.9.0 Dec 30 2020) // 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!
@ -28,7 +28,7 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE( wxWind
m_startPointLabel = new wxStaticText( this, wxID_ANY, _("Start Point"), wxDefaultPosition, wxDefaultSize, 0 ); m_startPointLabel = new wxStaticText( this, wxID_ANY, _("Start Point"), wxDefaultPosition, wxDefaultSize, 0 );
m_startPointLabel->Wrap( -1 ); m_startPointLabel->Wrap( -1 );
m_sizerLeft->Add( m_startPointLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); m_sizerLeft->Add( m_startPointLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
m_startXLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_startXLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_startXLabel->Wrap( -1 ); m_startXLabel->Wrap( -1 );
@ -54,7 +54,7 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE( wxWind
m_endPointLabel = new wxStaticText( this, wxID_ANY, _("End Point"), wxDefaultPosition, wxDefaultSize, 0 ); m_endPointLabel = new wxStaticText( this, wxID_ANY, _("End Point"), wxDefaultPosition, wxDefaultSize, 0 );
m_endPointLabel->Wrap( -1 ); m_endPointLabel->Wrap( -1 );
m_sizerLeft->Add( m_endPointLabel, wxGBPosition( 0, 3 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); m_sizerLeft->Add( m_endPointLabel, wxGBPosition( 0, 3 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
m_endXLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_endXLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_endXLabel->Wrap( -1 ); m_endXLabel->Wrap( -1 );
@ -80,7 +80,7 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE( wxWind
m_bezierCtrlPt1Label = new wxStaticText( this, wxID_ANY, _("Bezier Control Pt"), wxDefaultPosition, wxDefaultSize, 0 ); m_bezierCtrlPt1Label = new wxStaticText( this, wxID_ANY, _("Bezier Control Pt"), wxDefaultPosition, wxDefaultSize, 0 );
m_bezierCtrlPt1Label->Wrap( -1 ); m_bezierCtrlPt1Label->Wrap( -1 );
m_sizerLeft->Add( m_bezierCtrlPt1Label, wxGBPosition( 4, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); m_sizerLeft->Add( m_bezierCtrlPt1Label, wxGBPosition( 4, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
m_BezierPointC1XLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_BezierPointC1XLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_BezierPointC1XLabel->Wrap( -1 ); m_BezierPointC1XLabel->Wrap( -1 );
@ -106,7 +106,7 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE( wxWind
m_bezierCtrlPt2Label = new wxStaticText( this, wxID_ANY, _("Bezier Control Pt"), wxDefaultPosition, wxDefaultSize, 0 ); m_bezierCtrlPt2Label = new wxStaticText( this, wxID_ANY, _("Bezier Control Pt"), wxDefaultPosition, wxDefaultSize, 0 );
m_bezierCtrlPt2Label->Wrap( -1 ); m_bezierCtrlPt2Label->Wrap( -1 );
m_sizerLeft->Add( m_bezierCtrlPt2Label, wxGBPosition( 4, 3 ), wxGBSpan( 1, 3 ), wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); m_sizerLeft->Add( m_bezierCtrlPt2Label, wxGBPosition( 4, 3 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 );
m_BezierPointC2XLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 ); m_BezierPointC2XLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_BezierPointC2XLabel->Wrap( -1 ); m_BezierPointC2XLabel->Wrap( -1 );
@ -131,7 +131,7 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE( wxWind
m_sizerLeft->Add( m_BezierPointC2YUnit, wxGBPosition( 6, 5 ), wxGBSpan( 1, 1 ), wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); m_sizerLeft->Add( m_BezierPointC2YUnit, wxGBPosition( 6, 5 ), wxGBSpan( 1, 1 ), wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
bUpperSizer->Add( m_sizerLeft, 1, wxEXPAND|wxBOTTOM, 20 ); bUpperSizer->Add( m_sizerLeft, 1, wxEXPAND, 20 );
wxBoxSizer* bUpperRightSizer; wxBoxSizer* bUpperRightSizer;
bUpperRightSizer = new wxBoxSizer( wxVERTICAL ); bUpperRightSizer = new wxBoxSizer( wxVERTICAL );
@ -153,6 +153,15 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE( wxWind
m_angleUnits->Wrap( -1 ); m_angleUnits->Wrap( -1 );
fgUpperRightGridSizer->Add( m_angleUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 ); fgUpperRightGridSizer->Add( m_angleUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
m_locked = new wxCheckBox( this, wxID_ANY, _("Locked"), wxDefaultPosition, wxDefaultSize, 0 );
fgUpperRightGridSizer->Add( m_locked, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
fgUpperRightGridSizer->Add( 0, 0, 1, wxEXPAND, 5 );
fgUpperRightGridSizer->Add( 0, 0, 1, wxEXPAND, 5 );
m_filledCtrl = new wxCheckBox( this, wxID_ANY, _("Filled shape"), wxDefaultPosition, wxDefaultSize, 0 ); m_filledCtrl = new wxCheckBox( this, wxID_ANY, _("Filled shape"), wxDefaultPosition, wxDefaultSize, 0 );
fgUpperRightGridSizer->Add( m_filledCtrl, 0, wxTOP|wxLEFT, 5 ); fgUpperRightGridSizer->Add( m_filledCtrl, 0, wxTOP|wxLEFT, 5 );
@ -184,7 +193,7 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE( wxWind
fgUpperRightGridSizer->Add( 0, 0, 1, wxEXPAND, 5 ); fgUpperRightGridSizer->Add( 0, 0, 1, wxEXPAND, 5 );
bUpperRightSizer->Add( fgUpperRightGridSizer, 0, wxEXPAND, 5 ); bUpperRightSizer->Add( fgUpperRightGridSizer, 0, wxEXPAND|wxTOP, 5 );
bUpperSizer->Add( bUpperRightSizer, 0, wxEXPAND, 5 ); bUpperSizer->Add( bUpperRightSizer, 0, wxEXPAND, 5 );

View File

@ -14,7 +14,6 @@
<property name="file">dialog_graphic_item_properties_base</property> <property name="file">dialog_graphic_item_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_GRAPHIC_ITEM_PROPERTIES_BASE</property> <property name="name">DIALOG_GRAPHIC_ITEM_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">0</property> <property name="use_enum">0</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">
@ -73,7 +71,7 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">20</property> <property name="border">20</property>
<property name="flag">wxEXPAND|wxBOTTOM</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxGridBagSizer" expanded="1"> <object class="wxGridBagSizer" expanded="1">
<property name="empty_cell_size">5,5</property> <property name="empty_cell_size">5,5</property>
@ -90,7 +88,7 @@
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">3</property> <property name="colspan">3</property>
<property name="column">0</property> <property name="column">0</property>
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxALL</property> <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT</property>
<property name="row">0</property> <property name="row">0</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
@ -544,7 +542,7 @@
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">3</property> <property name="colspan">3</property>
<property name="column">3</property> <property name="column">3</property>
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxALL</property> <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT</property>
<property name="row">0</property> <property name="row">0</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
@ -998,7 +996,7 @@
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">3</property> <property name="colspan">3</property>
<property name="column">0</property> <property name="column">0</property>
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxALL</property> <property name="flag">wxALIGN_CENTER_HORIZONTAL|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="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
@ -1452,7 +1450,7 @@
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">3</property> <property name="colspan">3</property>
<property name="column">3</property> <property name="column">3</property>
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property> <property name="flag">wxALIGN_CENTER_HORIZONTAL|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="wxStaticText" expanded="1"> <object class="wxStaticText" expanded="1">
@ -1915,7 +1913,7 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="1"> <object class="wxFlexGridSizer" expanded="1">
<property name="cols">3</property> <property name="cols">3</property>
@ -2115,6 +2113,90 @@
<property name="wrap">-1</property> <property name="wrap">-1</property>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Locked</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_locked</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="spacer" expanded="1">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="spacer" expanded="1">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxTOP|wxLEFT</property> <property name="flag">wxTOP|wxLEFT</property>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.9.0 Dec 30 2020) // 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!
@ -71,6 +71,7 @@ class DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE : public DIALOG_SHIM
wxStaticText* m_angleLabel; wxStaticText* m_angleLabel;
wxTextCtrl* m_angleCtrl; wxTextCtrl* m_angleCtrl;
wxStaticText* m_angleUnits; wxStaticText* m_angleUnits;
wxCheckBox* m_locked;
wxCheckBox* m_filledCtrl; wxCheckBox* m_filledCtrl;
wxStaticText* m_thicknessLabel; wxStaticText* m_thicknessLabel;
wxTextCtrl* m_thicknessCtrl; wxTextCtrl* m_thicknessCtrl;
@ -82,7 +83,7 @@ class DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE : public DIALOG_SHIM
wxButton* m_StandardButtonsSizerOK; wxButton* m_StandardButtonsSizerOK;
wxButton* m_StandardButtonsSizerCancel; wxButton* m_StandardButtonsSizerCancel;
// Virtual event handlers, override them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
virtual void OnInitDlg( wxInitDialogEvent& event ) { event.Skip(); } virtual void OnInitDlg( wxInitDialogEvent& event ) { event.Skip(); }
virtual void onLayer( wxCommandEvent& event ) { event.Skip(); } virtual void onLayer( wxCommandEvent& event ) { event.Skip(); }

View File

@ -853,6 +853,9 @@ void PCB_IO::format( PCB_SHAPE* aShape, int aNestLevel ) const
m_out->Print( 0, " (fill none)" ); m_out->Print( 0, " (fill none)" );
} }
if( aShape->IsLocked() )
m_out->Print( 0, " (locked)" );
m_out->Print( 0, " (tstamp %s)", TO_UTF8( aShape->m_Uuid.AsString() ) ); m_out->Print( 0, " (tstamp %s)", TO_UTF8( aShape->m_Uuid.AsString() ) );
m_out->Print( 0, ")\n" ); m_out->Print( 0, ")\n" );
@ -948,6 +951,9 @@ void PCB_IO::format( FP_SHAPE* aFPShape, int aNestLevel ) const
m_out->Print( 0, " (fill none)" ); m_out->Print( 0, " (fill none)" );
} }
if( aFPShape->IsLocked() )
m_out->Print( 0, " (locked)" );
m_out->Print( 0, " (tstamp %s)", TO_UTF8( aFPShape->m_Uuid.AsString() ) ); m_out->Print( 0, " (tstamp %s)", TO_UTF8( aFPShape->m_Uuid.AsString() ) );
m_out->Print( 0, ")\n" ); m_out->Print( 0, ")\n" );

View File

@ -2318,8 +2318,13 @@ PCB_SHAPE* PCB_PARSER::parsePCB_SHAPE()
NeedRIGHT(); NeedRIGHT();
break; break;
case T_locked:
shape->SetLocked( true );
NeedRIGHT();
break;
default: default:
Expecting( "layer, width, fill, tstamp, or status" ); Expecting( "layer, width, fill, tstamp, locked or status" );
} }
} }
@ -3495,8 +3500,13 @@ FP_SHAPE* PCB_PARSER::parseFP_SHAPE()
NeedRIGHT(); NeedRIGHT();
break; break;
case T_locked:
shape->SetLocked( true );
NeedRIGHT();
break;
default: default:
Expecting( "layer, width, fill, tstamp, or status" ); Expecting( "layer, width, fill, tstamp, locked, or status" );
} }
} }
@ -4187,7 +4197,7 @@ ARC* PCB_PARSER::parseARC()
break; break;
case T_locked: case T_locked:
arc->SetState( TRACK_LOCKED, 1 ); arc->SetLocked( true );
break; break;
default: default:
@ -4258,7 +4268,7 @@ TRACK* PCB_PARSER::parseTRACK()
break; break;
case T_locked: case T_locked:
track->SetState( TRACK_LOCKED, 1 ); track->SetLocked( true );
break; break;
default: default:
@ -4365,7 +4375,7 @@ VIA* PCB_PARSER::parseVIA()
break; break;
case T_locked: case T_locked:
via->SetState( TRACK_LOCKED, 1 ); via->SetLocked( true );
NeedRIGHT(); NeedRIGHT();
break; break;

View File

@ -728,15 +728,7 @@ void TRACK::GetMsgPanelInfoBase_Common( EDA_DRAW_FRAME* aFrame, std::vector<MSG_
#endif #endif
// Display the State member // Display the State member
msg = wxT( ". . " ); aList.emplace_back( _( "Status" ), IsLocked() ? _( "Locked" ) : _( "" ) );
if( GetState( TRACK_LOCKED ) )
msg[0] = 'L';
if( GetState( TRACK_AR ) )
msg[2] = 'A';
aList.emplace_back( _( "Status" ), msg );
} }
@ -980,11 +972,8 @@ wxString TRACK::ShowState( int stateBits )
if( stateBits & IS_LINKED ) if( stateBits & IS_LINKED )
ret << wxT( " | IS_LINKED" ); ret << wxT( " | IS_LINKED" );
if( stateBits & TRACK_AR ) if( stateBits & LOCKED )
ret << wxT( " | TRACK_AR" ); ret << wxT( " | LOCKED" );
if( stateBits & TRACK_LOCKED )
ret << wxT( " | TRACK_LOCKED" );
if( stateBits & IN_EDIT ) if( stateBits & IN_EDIT )
ret << wxT( " | IN_EDIT" ); ret << wxT( " | IN_EDIT" );

View File

@ -133,16 +133,6 @@ public:
// Virtual function // Virtual function
const EDA_RECT GetBoundingBox() const override; const EDA_RECT GetBoundingBox() const override;
bool IsLocked() const override
{
return GetState( TRACK_LOCKED );
}
void SetLocked( bool aLocked ) override
{
return SetState( TRACK_LOCKED, aLocked );
}
/** /**
* Function GetLength * Function GetLength
* returns the length of the track using the hypotenuse calculation. * returns the length of the track using the hypotenuse calculation.