diff --git a/pcbnew/board_item.cpp b/pcbnew/board_item.cpp index 8a24f9fa84..a1c1acbb0a 100644 --- a/pcbnew/board_item.cpp +++ b/pcbnew/board_item.cpp @@ -66,7 +66,9 @@ bool BOARD_ITEM::IsLocked() const if( GetParentGroup() ) return GetParentGroup()->IsLocked(); - return GetState( LOCKED ); + const BOARD* board = GetBoard(); + + return board && board->GetBoardUse() != BOARD_USE::FPHOLDER && GetState( LOCKED ); } diff --git a/pcbnew/dialogs/dialog_footprint_properties.cpp b/pcbnew/dialogs/dialog_footprint_properties.cpp index f622b0d672..58e5118462 100644 --- a/pcbnew/dialogs/dialog_footprint_properties.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties.cpp @@ -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() { if( !wxDialog::TransferDataToWindow() ) diff --git a/pcbnew/dialogs/dialog_group_properties.cpp b/pcbnew/dialogs/dialog_group_properties.cpp index b2cb7aa593..8aabd690b3 100644 --- a/pcbnew/dialogs/dialog_group_properties.cpp +++ b/pcbnew/dialogs/dialog_group_properties.cpp @@ -43,7 +43,9 @@ DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, m_bpRemoveMember->SetBitmap( KiBitmap( BITMAPS::small_trash ) ); m_nameCtrl->SetValue( m_group->GetName() ); + m_locked->SetValue( m_group->IsLocked() ); + m_locked->Show( dynamic_cast( aParent ) != nullptr ); for( BOARD_ITEM* item : m_group->GetItems() ) m_membersList->Append( item->GetSelectMenuText( m_brdEditor->GetUserUnits() ), item ); diff --git a/pcbnew/dialogs/dialog_pad_properties.h b/pcbnew/dialogs/dialog_pad_properties.h index 5f0845fca7..5ef5a30e1b 100644 --- a/pcbnew/dialogs/dialog_pad_properties.h +++ b/pcbnew/dialogs/dialog_pad_properties.h @@ -158,7 +158,6 @@ private: UNIT_BINDER m_chamferRatio; UNIT_BINDER m_mixedCornerRatio, m_mixedChamferRatio; UNIT_BINDER m_holeX, m_holeY; - double m_OrientValue; UNIT_BINDER m_clearance; UNIT_BINDER m_maskMargin; UNIT_BINDER m_pasteMargin, m_pasteMarginRatio; diff --git a/pcbnew/dialogs/dialog_pad_properties_base.cpp b/pcbnew/dialogs/dialog_pad_properties_base.cpp index 0958ffef27..4fb2baf19d 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.cpp +++ b/pcbnew/dialogs/dialog_pad_properties_base.cpp @@ -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/ // // 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->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 ); @@ -1442,9 +1442,9 @@ DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE::DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE( wxWi m_gridCornersList->SetColSize( 1, 124 ); m_gridCornersList->EnableDragColMove( false ); m_gridCornersList->EnableDragColSize( true ); + m_gridCornersList->SetColLabelSize( 22 ); m_gridCornersList->SetColLabelValue( 0, _("Pos X") ); m_gridCornersList->SetColLabelValue( 1, _("Pos Y") ); - m_gridCornersList->SetColLabelSize( 22 ); m_gridCornersList->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); // Rows diff --git a/pcbnew/dialogs/dialog_pad_properties_base.fbp b/pcbnew/dialogs/dialog_pad_properties_base.fbp index 70d5b66e6c..ae1783c2a0 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.fbp +++ b/pcbnew/dialogs/dialog_pad_properties_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,7 +14,6 @@ dialog_pad_properties_base 1000 none - 1 dialog_pad_properties_base @@ -26,7 +25,6 @@ 1 1 UI - 0 1 0 @@ -52,7 +50,6 @@ DIALOG_SHIM; dialog_shim.h Pad Properties - 0 @@ -1000,7 +997,7 @@ 5 1 0 - wxBOTTOM|wxRIGHT + wxBOTTOM|wxRIGHT|wxLEFT 4 1 @@ -9297,7 +9294,6 @@ - 0 @@ -9371,7 +9367,6 @@ - 0 @@ -9445,7 +9440,6 @@ - 0 @@ -9519,7 +9513,6 @@ - 0 @@ -9603,7 +9596,6 @@ - 0 @@ -10929,7 +10921,6 @@ DIALOG_SHIM; - 0 @@ -13285,7 +13276,6 @@ DIALOG_SHIM; Pad Custom Shape Geometry Transform - 0 @@ -14390,7 +14380,6 @@ DIALOG_SHIM; Basic Shape Polygon - 0 @@ -14529,7 +14518,6 @@ - 0 @@ -14613,7 +14601,6 @@ - 0 diff --git a/pcbnew/dialogs/dialog_pad_properties_base.h b/pcbnew/dialogs/dialog_pad_properties_base.h index e6829cafb7..4ccf07bab2 100644 --- a/pcbnew/dialogs/dialog_pad_properties_base.h +++ b/pcbnew/dialogs/dialog_pad_properties_base.h @@ -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/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -10,10 +10,8 @@ #include #include #include -class DIALOG_SHIM; class TEXT_CTRL_EVAL; class WX_GRID; -class wxListView; #include "dialog_shim.h" #include @@ -236,7 +234,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM wxButton* m_sdbSizerOK; 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 OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } virtual void PadTypeSelected( wxCommandEvent& event ) { event.Skip(); } @@ -265,7 +263,6 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM 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(); }; @@ -321,7 +318,6 @@ class DIALOG_PAD_PRIMITIVES_PROPERTIES_BASE : public DIALOG_SHIM 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(); }; @@ -356,7 +352,6 @@ class DIALOG_PAD_PRIMITIVES_TRANSFORM_BASE : public DIALOG_SHIM 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(); }; @@ -385,7 +380,7 @@ class DIALOG_PAD_PRIMITIVE_POLY_PROPS_BASE : public DIALOG_SHIM wxButton* m_sdbSizerOK; 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 onCellSelect( wxGridEvent& 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: 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(); }; diff --git a/pcbnew/dialogs/dialog_text_properties.cpp b/pcbnew/dialogs/dialog_text_properties.cpp index 6f4ab24099..379eb00d1a 100644 --- a/pcbnew/dialogs/dialog_text_properties.cpp +++ b/pcbnew/dialogs/dialog_text_properties.cpp @@ -74,11 +74,16 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, BO if( m_item->Type() == PCB_FP_TEXT_T ) { - title = _( "Footprint Text Properties" ); - m_fpText = (FP_TEXT*) m_item; m_edaText = static_cast( 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() ) { 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 ); m_MultiLineSizer->Show( false ); + + // Do not allow locking items in the footprint editor + m_cbLocked->Show( false ); } 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. m_Visible->SetValue( true ); - m_Visible->Enable( false ); + m_Visible->Show( false ); m_KeepUpright->Show( false ); m_statusLine->Show( false ); diff --git a/pcbnew/footprint.cpp b/pcbnew/footprint.cpp index 510d715b58..9bf92ff51b 100644 --- a/pcbnew/footprint.cpp +++ b/pcbnew/footprint.cpp @@ -941,7 +941,7 @@ void FOOTPRINT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vectorGetName() == PCB_EDIT_FRAME_NAME && IsLocked() ) addToken( &status, _( "Locked" ) ); if( m_fpStatus & FP_is_PLACED ) diff --git a/pcbnew/fp_shape.cpp b/pcbnew/fp_shape.cpp index 6051916882..9cd1a3f7ac 100644 --- a/pcbnew/fp_shape.cpp +++ b/pcbnew/fp_shape.cpp @@ -109,9 +109,13 @@ void FP_SHAPE::SetDrawCoord() void FP_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ) { - FOOTPRINT* fp = static_cast( m_parent ); + if( aFrame->GetName() == PCB_EDIT_FRAME_NAME ) + { + FOOTPRINT* fp = static_cast( m_parent ); - aList.emplace_back( _( "Footprint" ), fp ? fp->GetReference() : _( "" ) ); + if( fp ) + aList.emplace_back( _( "Footprint" ), fp->GetReference() ); + } // append the features shared with the base class PCB_SHAPE::GetMsgPanelInfo( aFrame, aList ); diff --git a/pcbnew/fp_text.cpp b/pcbnew/fp_text.cpp index 10d7ca7cd6..1bb8b1f232 100644 --- a/pcbnew/fp_text.cpp +++ b/pcbnew/fp_text.cpp @@ -264,15 +264,20 @@ double FP_TEXT::GetDrawRotation() const void FP_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& aList ) { - FOOTPRINT* fp = static_cast( m_parent ); - wxString msg; + wxString msg; static const wxString text_type_msg[3] = { - _( "Ref." ), _( "Value" ), _( "Text" ) + _( "Reference" ), _( "Value" ), _( "Text" ) }; - aList.emplace_back( _( "Footprint" ), fp ? fp->GetReference() : _( "" ) ); + if( aFrame->GetName() == PCB_EDIT_FRAME_NAME ) + { + FOOTPRINT* fp = static_cast( m_parent ); + + if( fp ) + aList.emplace_back( _( "Footprint" ), fp->GetReference() ); + } // Don't use GetShownText() here; we want to show the user the variable references aList.emplace_back( _( "Text" ), UnescapeString( GetText() ) ); @@ -280,7 +285,7 @@ void FP_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector= TEXT_is_REFERENCE && m_Type <= TEXT_is_DIVERS ); 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( _( "Display" ), IsVisible() ? _( "Yes" ) : _( "No" ) ); diff --git a/pcbnew/pad.cpp b/pcbnew/pad.cpp index 34bc8dd0ba..0433e7e3cf 100644 --- a/pcbnew/pad.cpp +++ b/pcbnew/pad.cpp @@ -156,7 +156,7 @@ bool PAD::CanHaveNumber() const bool PAD::IsLocked() const { - if( GetParent() && static_cast( GetParent() )->IsLocked() ) + if( GetParent() && GetParent()->IsLocked() ) return true; return BOARD_ITEM::IsLocked(); @@ -866,8 +866,11 @@ void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& wxString msg; FOOTPRINT* parentFootprint = static_cast( m_parent ); - if( parentFootprint ) - aList.emplace_back( _( "Footprint" ), parentFootprint->GetReference() ); + if( aFrame->GetName() == PCB_EDIT_FRAME_NAME ) + { + if( parentFootprint ) + aList.emplace_back( _( "Footprint" ), parentFootprint->GetReference() ); + } aList.emplace_back( _( "Pad" ), m_number ); @@ -877,12 +880,15 @@ void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& if( !GetPinType().IsEmpty() ) aList.emplace_back( _( "Pin Type" ), GetPinType() ); - aList.emplace_back( _( "Net" ), UnescapeString( GetNetname() ) ); + if( aFrame->GetName() == PCB_EDIT_FRAME_NAME ) + { + aList.emplace_back( _( "Net" ), UnescapeString( GetNetname() ) ); - aList.emplace_back( _( "NetClass" ), UnescapeString( GetNetClass()->GetName() ) ); + aList.emplace_back( _( "Net Class" ), UnescapeString( GetNetClass()->GetName() ) ); - if( IsLocked() ) - aList.emplace_back( _( "Status" ), _( "Locked" ) ); + if( IsLocked() ) + aList.emplace_back( _( "Status" ), _( "Locked" ) ); + } if( GetAttribute() == PAD_ATTRIB::SMD || GetAttribute() == PAD_ATTRIB::CONN ) aList.emplace_back( _( "Layer" ), layerMaskDescribe() ); @@ -895,13 +901,13 @@ void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& switch( GetProperty() ) { - case PAD_PROP::NONE: break; - case PAD_PROP::BGA: props += _("BGA" ); break; - case PAD_PROP::FIDUCIAL_GLBL: props += _("Fiducial global" ); break; - case PAD_PROP::FIDUCIAL_LOCAL: props += _("Fiducial local" ); break; - case PAD_PROP::TESTPOINT: props += _("Test point" ); break; - case PAD_PROP::HEATSINK: props += _("Heat sink" ); break; - case PAD_PROP::CASTELLATED: props += _("Castellated" ); break; + case PAD_PROP::NONE: break; + case PAD_PROP::BGA: props += _( "BGA" ); break; + case PAD_PROP::FIDUCIAL_GLBL: props += _( "Fiducial global" ); break; + case PAD_PROP::FIDUCIAL_LOCAL: props += _( "Fiducial local" ); break; + case PAD_PROP::TESTPOINT: props += _( "Test point" ); break; + case PAD_PROP::HEATSINK: props += _( "Heat sink" ); break; + case PAD_PROP::CASTELLATED: props += _( "Castellated" ); break; } aList.emplace_back( ShowPadShape(), props ); @@ -954,9 +960,13 @@ void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& wxString source; int clearance = GetOwnClearance( GetLayer(), &source ); - aList.emplace_back( wxString::Format( _( "Min Clearance: %s" ), - MessageTextFromValue( units, clearance ) ), - wxString::Format( _( "(from %s)" ), source ) ); + if( !source.IsEmpty() ) + { + aList.emplace_back( wxString::Format( _( "Min Clearance: %s" ), + MessageTextFromValue( units, clearance ) ), + wxString::Format( _( "(from %s)" ), + source ) ); + } #if 0 // useful for debug only aList.emplace_back( "UUID", m_Uuid.AsString() ); diff --git a/pcbnew/pcb_dimension.cpp b/pcbnew/pcb_dimension.cpp index cf471fb3e9..b77385e071 100644 --- a/pcbnew/pcb_dimension.cpp +++ b/pcbnew/pcb_dimension.cpp @@ -347,7 +347,7 @@ void PCB_DIMENSION_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, aList.emplace_back( start, end ); } - if( IsLocked() ) + if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() ) aList.emplace_back( _( "Status" ), _( "Locked" ) ); aList.emplace_back( _( "Layer" ), GetLayerName() ); diff --git a/pcbnew/pcb_group.cpp b/pcbnew/pcb_group.cpp index 2bdb5725bc..27eff858de 100644 --- a/pcbnew/pcb_group.cpp +++ b/pcbnew/pcb_group.cpp @@ -22,6 +22,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #include +#include #include #include #include @@ -334,7 +335,7 @@ void PCB_GROUP::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector" ) : m_name ); 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" ) ); } diff --git a/pcbnew/pcb_shape.cpp b/pcbnew/pcb_shape.cpp index d97ea2685d..ccb5eb9ae7 100644 --- a/pcbnew/pcb_shape.cpp +++ b/pcbnew/pcb_shape.cpp @@ -151,7 +151,7 @@ void PCB_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vectorGetName() == PCB_EDIT_FRAME_NAME && IsLocked() ) aList.emplace_back( _( "Status" ), _( "Locked" ) ); ShapeGetMsgPanelInfo( aFrame, aList ); diff --git a/pcbnew/pcb_text.cpp b/pcbnew/pcb_text.cpp index 21cb00e1c3..5bdc6a4e41 100644 --- a/pcbnew/pcb_text.cpp +++ b/pcbnew/pcb_text.cpp @@ -114,7 +114,7 @@ void PCB_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vectorGetName() == PCB_EDIT_FRAME_NAME && IsLocked() ) aList.emplace_back( _( "Status" ), _( "Locked" ) ); aList.emplace_back( _( "Layer" ), GetLayerName() ); diff --git a/pcbnew/pcb_track.cpp b/pcbnew/pcb_track.cpp index 81fc05c82f..1688385cf5 100644 --- a/pcbnew/pcb_track.cpp +++ b/pcbnew/pcb_track.cpp @@ -787,7 +787,7 @@ void PCB_TRACK::GetMsgPanelInfoBase_Common( EDA_DRAW_FRAME* aFrame, aList.emplace_back( _( "Net" ), UnescapeString( GetNetname() ) ); - aList.emplace_back( _( "NetClass" ), UnescapeString( GetNetClass()->GetName() ) ); + aList.emplace_back( _( "Net Class" ), UnescapeString( GetNetClass()->GetName() ) ); #if 0 // Enable for debugging if( GetBoard() ) @@ -803,8 +803,8 @@ void PCB_TRACK::GetMsgPanelInfoBase_Common( EDA_DRAW_FRAME* aFrame, m_End.y ) ); #endif - // Display the State member - aList.emplace_back( _( "Status" ), IsLocked() ? _( "Locked" ) : wxT( "" ) ); + if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() ) + aList.emplace_back( _( "Status" ), _( "Locked" ) ); } diff --git a/pcbnew/zone.cpp b/pcbnew/zone.cpp index b096bb80d8..6edc84ab2a 100644 --- a/pcbnew/zone.cpp +++ b/pcbnew/zone.cpp @@ -590,16 +590,22 @@ void ZONE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& } else if( IsOnCopperLayer() ) { - aList.emplace_back( _( "Net" ), UnescapeString( GetNetname() ) ); + if( aFrame->GetName() == PCB_EDIT_FRAME_NAME ) + { + aList.emplace_back( _( "Net" ), UnescapeString( GetNetname() ) ); - aList.emplace_back( _( "NetClass" ), UnescapeString( GetNetClass()->GetName() ) ); + aList.emplace_back( _( "Net Class" ), UnescapeString( GetNetClass()->GetName() ) ); + } // Display priority level aList.emplace_back( _( "Priority" ), wxString::Format( "%d", GetPriority() ) ); } - if( IsLocked() ) - aList.emplace_back( _( "Status" ), _( "Locked" ) ); + if( aFrame->GetName() == PCB_EDIT_FRAME_NAME ) + { + if( IsLocked() ) + aList.emplace_back( _( "Status" ), _( "Locked" ) ); + } wxString layerDesc; int count = 0; @@ -635,9 +641,13 @@ void ZONE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector& wxString source; int clearance = GetOwnClearance( GetLayer(), &source ); - aList.emplace_back( wxString::Format( _( "Min Clearance: %s" ), - MessageTextFromValue( units, clearance ) ), - wxString::Format( _( "(from %s)" ), source ) ); + if( !source.IsEmpty() ) + { + aList.emplace_back( wxString::Format( _( "Min Clearance: %s" ), + MessageTextFromValue( units, clearance ) ), + wxString::Format( _( "(from %s)" ), + source ) ); + } // Useful for statistics, especially when zones are complex the number of hatches // and filled polygons can explain the display and DRC calculation time: