diff --git a/pcbnew/dialogs/dialog_graphic_item_properties.cpp b/pcbnew/dialogs/dialog_graphic_item_properties.cpp index e9e905b8a6..ae89b3185d 100644 --- a/pcbnew/dialogs/dialog_graphic_item_properties.cpp +++ b/pcbnew/dialogs/dialog_graphic_item_properties.cpp @@ -76,8 +76,6 @@ private: } bool Validate() override; - - void onLayer( wxCommandEvent& event ) override; }; DIALOG_GRAPHIC_ITEM_PROPERTIES::DIALOG_GRAPHIC_ITEM_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, @@ -189,27 +187,15 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow() case S_ARC: SetTitle( _( "Arc Properties" ) ); m_AngleValue = m_item->GetAngle() / 10.0; - m_filledCtrl->Show( false ); break; case S_POLYGON: - { - LSET graphicPolygonsLayers = LSET::AllLayersMask(); - graphicPolygonsLayers.reset( Edge_Cuts ).reset( F_CrtYd ).reset( B_CrtYd ); - SetTitle( _( "Polygon Properties" ) ); m_sizerLeft->Show( false ); - m_filledCtrl->Show( true ); - m_filledCtrl->Enable( graphicPolygonsLayers.Contains( m_item->GetLayer() ) ); - - // Prevent courtyard/edge cuts from being filled - if( !graphicPolygonsLayers.Contains( m_item->GetLayer() ) ) - m_filledCtrl->SetValue( false ); - break; - } + case S_RECT: SetTitle( _( "Rectangle Properties" ) ); @@ -217,13 +203,13 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataToWindow() break; case S_SEGMENT: + SetTitle( _( "Line Segment Properties" ) ); + if( m_item->GetStart().x == m_item->GetEnd().x ) m_flipStartEnd = m_item->GetStart().y > m_item->GetEnd().y; else m_flipStartEnd = m_item->GetStart().x > m_item->GetEnd().x; - SetTitle( _( "Line Segment Properties" ) ); - m_filledCtrl->Show( false ); break; @@ -378,24 +364,6 @@ bool DIALOG_GRAPHIC_ITEM_PROPERTIES::TransferDataFromWindow() } -void DIALOG_GRAPHIC_ITEM_PROPERTIES::onLayer( wxCommandEvent& event ) -{ - if( m_item->GetShape() == S_POLYGON ) - { - LSET graphicPolygonsLayers = LSET::AllLayersMask(); - graphicPolygonsLayers.reset( Edge_Cuts ).reset( F_CrtYd ).reset( B_CrtYd ); - - m_filledCtrl->Enable( graphicPolygonsLayers.Contains( - ToLAYER_ID( m_LayerSelectionCtrl->GetLayerSelection() ) ) ); - - // Prevent courtyard/edge cuts from being filled - if( !graphicPolygonsLayers.Contains( - ToLAYER_ID( m_LayerSelectionCtrl->GetLayerSelection() ) ) ) - m_filledCtrl->SetValue( false ); - } -} - - bool DIALOG_GRAPHIC_ITEM_PROPERTIES::Validate() { wxArrayString error_msgs; diff --git a/pcbnew/dialogs/dialog_graphic_item_properties_base.cpp b/pcbnew/dialogs/dialog_graphic_item_properties_base.cpp index ce63dfe149..13148352ee 100644 --- a/pcbnew/dialogs/dialog_graphic_item_properties_base.cpp +++ b/pcbnew/dialogs/dialog_graphic_item_properties_base.cpp @@ -223,7 +223,6 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE( wxWind // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::OnClose ) ); this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::OnInitDlg ) ); - m_LayerSelectionCtrl->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::onLayer ), NULL, this ); } DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::~DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE() @@ -231,6 +230,5 @@ DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::~DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE() // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::OnClose ) ); this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::OnInitDlg ) ); - m_LayerSelectionCtrl->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE::onLayer ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_graphic_item_properties_base.fbp b/pcbnew/dialogs/dialog_graphic_item_properties_base.fbp index 44c9d34354..4372b3a89d 100644 --- a/pcbnew/dialogs/dialog_graphic_item_properties_base.fbp +++ b/pcbnew/dialogs/dialog_graphic_item_properties_base.fbp @@ -2591,7 +2591,6 @@ - onLayer diff --git a/pcbnew/dialogs/dialog_graphic_item_properties_base.h b/pcbnew/dialogs/dialog_graphic_item_properties_base.h index 8be037602a..ca4fe107e7 100644 --- a/pcbnew/dialogs/dialog_graphic_item_properties_base.h +++ b/pcbnew/dialogs/dialog_graphic_item_properties_base.h @@ -86,7 +86,6 @@ class DIALOG_GRAPHIC_ITEM_PROPERTIES_BASE : public DIALOG_SHIM // Virtual event handlers, overide them in your derived class virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } virtual void OnInitDlg( wxInitDialogEvent& event ) { event.Skip(); } - virtual void onLayer( wxCommandEvent& event ) { event.Skip(); } public: