Browse Source

DIALOG_GLOBAL_DELETION: enable graphic items filters when board outlines is enabled.

6.0.7
jean-pierre charras 4 years ago
parent
commit
b37664092d
  1. 15
      pcbnew/dialogs/dialog_global_deletion.cpp
  2. 1
      pcbnew/dialogs/dialog_global_deletion.h
  3. 4
      pcbnew/dialogs/dialog_global_deletion_base.cpp
  4. 4
      pcbnew/dialogs/dialog_global_deletion_base.fbp
  5. 6
      pcbnew/dialogs/dialog_global_deletion_base.h

15
pcbnew/dialogs/dialog_global_deletion.cpp

@ -94,8 +94,19 @@ void DIALOG_GLOBAL_DELETION::onCheckDeleteFootprints( wxCommandEvent& event )
void DIALOG_GLOBAL_DELETION::onCheckDeleteDrawings( wxCommandEvent& event )
{
m_drawingFilterLocked->Enable( m_delDrawings->GetValue() );
m_drawingFilterUnlocked->Enable( m_delDrawings->GetValue() );
bool enable = m_delDrawings->GetValue() || m_delBoardEdges->GetValue();
m_drawingFilterLocked->Enable( enable );
m_drawingFilterUnlocked->Enable( enable );
}
void DIALOG_GLOBAL_DELETION::onCheckDeleteBoardOutlines( wxCommandEvent& event )
{
bool enable = m_delDrawings->GetValue() || m_delBoardEdges->GetValue();
m_drawingFilterLocked->Enable( enable );
m_drawingFilterUnlocked->Enable( enable );
}

1
pcbnew/dialogs/dialog_global_deletion.h

@ -39,6 +39,7 @@ private:
void onCheckDeleteTracks( wxCommandEvent& event ) override;
void onCheckDeleteFootprints( wxCommandEvent& event ) override;
void onCheckDeleteDrawings( wxCommandEvent& event ) override;
void onCheckDeleteBoardOutlines( wxCommandEvent& event ) override;
PCB_EDIT_FRAME* m_Parent;
LAYER_NUM m_currentLayer;

4
pcbnew/dialogs/dialog_global_deletion_base.cpp

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 18 2020)
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -129,6 +129,7 @@ DIALOG_GLOBAL_DELETION_BASE::DIALOG_GLOBAL_DELETION_BASE( wxWindow* parent, wxWi
this->Centre( wxBOTH );
// Connect Events
m_delBoardEdges->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteBoardOutlines ), NULL, this );
m_delDrawings->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteDrawings ), NULL, this );
m_delFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteFootprints ), NULL, this );
m_delTracks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteTracks ), NULL, this );
@ -137,6 +138,7 @@ DIALOG_GLOBAL_DELETION_BASE::DIALOG_GLOBAL_DELETION_BASE( wxWindow* parent, wxWi
DIALOG_GLOBAL_DELETION_BASE::~DIALOG_GLOBAL_DELETION_BASE()
{
// Disconnect Events
m_delBoardEdges->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteBoardOutlines ), NULL, this );
m_delDrawings->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteDrawings ), NULL, this );
m_delFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteFootprints ), NULL, this );
m_delTracks->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteTracks ), NULL, this );

4
pcbnew/dialogs/dialog_global_deletion_base.fbp

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="15" />
<FileVersion major="1" minor="16" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
@ -52,6 +52,7 @@
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Delete Items</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
@ -271,6 +272,7 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnCheckBox">onCheckDeleteBoardOutlines</event>
</object>
</object>
<object class="sizeritem" expanded="1">

6
pcbnew/dialogs/dialog_global_deletion_base.h

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 18 2020)
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -61,7 +61,8 @@ class DIALOG_GLOBAL_DELETION_BASE : public DIALOG_SHIM
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class
// Virtual event handlers, override them in your derived class
virtual void onCheckDeleteBoardOutlines( wxCommandEvent& event ) { event.Skip(); }
virtual void onCheckDeleteDrawings( wxCommandEvent& event ) { event.Skip(); }
virtual void onCheckDeleteFootprints( wxCommandEvent& event ) { event.Skip(); }
virtual void onCheckDeleteTracks( wxCommandEvent& event ) { event.Skip(); }
@ -70,6 +71,7 @@ class DIALOG_GLOBAL_DELETION_BASE : public DIALOG_SHIM
public:
DIALOG_GLOBAL_DELETION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Delete Items"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_GLOBAL_DELETION_BASE();
};

Loading…
Cancel
Save