Remove locking from footprint editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/9496
This commit is contained in:
Jeff Young 2021-10-31 16:32:24 +00:00
parent e3ef101ec9
commit 22ba640c2b
18 changed files with 93 additions and 83 deletions

View File

@ -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 );
}

View File

@ -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() )

View File

@ -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<PCB_EDIT_FRAME*>( aParent ) != nullptr );
for( BOARD_ITEM* item : m_group->GetItems() )
m_membersList->Append( item->GetSelectMenuText( m_brdEditor->GetUserUnits() ), item );

View File

@ -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;

View File

@ -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

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="16" />
<FileVersion major="1" minor="15" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
@ -14,7 +14,6 @@
<property name="file">dialog_pad_properties_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_pad_properties_base</property>
@ -26,7 +25,6 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@ -52,7 +50,6 @@
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Pad Properties</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>
@ -1000,7 +997,7 @@
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">0</property>
<property name="flag">wxBOTTOM|wxRIGHT</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="row">4</property>
<property name="rowspan">1</property>
<object class="wxCheckBox" expanded="1">
@ -9297,7 +9294,6 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -9371,7 +9367,6 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -9445,7 +9440,6 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -9519,7 +9513,6 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -9603,7 +9596,6 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -10929,7 +10921,6 @@
<property name="subclass">DIALOG_SHIM; </property>
<property name="title"></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>
@ -13285,7 +13276,6 @@
<property name="subclass">DIALOG_SHIM; </property>
<property name="title">Pad Custom Shape Geometry Transform</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>
@ -14390,7 +14380,6 @@
<property name="subclass">DIALOG_SHIM; </property>
<property name="title">Basic Shape Polygon</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>
@ -14529,7 +14518,6 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -14613,7 +14601,6 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>

View File

@ -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 <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
class TEXT_CTRL_EVAL;
class WX_GRID;
class wxListView;
#include "dialog_shim.h"
#include <wx/string.h>
@ -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();
};

View File

@ -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<EDA_TEXT*>( m_fpText );
switch( m_fpText->GetType() )
{
case FP_TEXT::TEXT_is_REFERENCE: title = _( "Footprint Reference Properties" ); break;
case FP_TEXT::TEXT_is_VALUE: title = _( "Footprint Value Properties" ); break;
case FP_TEXT::TEXT_is_DIVERS: title = _( "Footprint Text Properties" ); break;
}
switch( m_fpText->GetType() )
{
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 );

View File

@ -941,7 +941,7 @@ void FOOTPRINT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
wxString status;
wxString attrs;
if( IsLocked() )
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() )
addToken( &status, _( "Locked" ) );
if( m_fpStatus & FP_is_PLACED )

View File

@ -109,9 +109,13 @@ void FP_SHAPE::SetDrawCoord()
void FP_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
{
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME )
{
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
aList.emplace_back( _( "Footprint" ), fp ? fp->GetReference() : _( "<invalid>" ) );
if( fp )
aList.emplace_back( _( "Footprint" ), fp->GetReference() );
}
// append the features shared with the base class
PCB_SHAPE::GetMsgPanelInfo( aFrame, aList );

View File

@ -264,15 +264,20 @@ double FP_TEXT::GetDrawRotation() const
void FP_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
{
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
wxString msg;
wxString msg;
static const wxString text_type_msg[3] =
{
_( "Ref." ), _( "Value" ), _( "Text" )
_( "Reference" ), _( "Value" ), _( "Text" )
};
aList.emplace_back( _( "Footprint" ), fp ? fp->GetReference() : _( "<invalid>" ) );
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME )
{
FOOTPRINT* fp = static_cast<FOOTPRINT*>( m_parent );
if( fp )
aList.emplace_back( _( "Footprint" ), fp->GetReference() );
}
// Don't use GetShownText() here; we want to show the user the variable references
aList.emplace_back( _( "Text" ), UnescapeString( GetText() ) );
@ -280,7 +285,7 @@ void FP_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITE
wxASSERT( m_Type >= TEXT_is_REFERENCE && m_Type <= TEXT_is_DIVERS );
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" ) );

View File

@ -156,7 +156,7 @@ bool PAD::CanHaveNumber() const
bool PAD::IsLocked() const
{
if( GetParent() && static_cast<FOOTPRINT*>( 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<MSG_PANEL_ITEM>&
wxString msg;
FOOTPRINT* parentFootprint = static_cast<FOOTPRINT*>( 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<MSG_PANEL_ITEM>&
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<MSG_PANEL_ITEM>&
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<MSG_PANEL_ITEM>&
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() );

View File

@ -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() );

View File

@ -22,6 +22,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <bitmaps.h>
#include <eda_draw_frame.h>
#include <board.h>
#include <board_item.h>
#include <pcb_group.h>
@ -334,7 +335,7 @@ void PCB_GROUP::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
aList.emplace_back( _( "Group" ), m_name.empty() ? _( "<unnamed>" ) : m_name );
aList.emplace_back( _( "Members" ), wxString::Format( "%zu", m_items.size() ) );
if( IsLocked() )
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() )
aList.emplace_back( _( "Status" ), _( "Locked" ) );
}

View File

@ -151,7 +151,7 @@ void PCB_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
{
aList.emplace_back( _( "Type" ), _( "Drawing" ) );
if( IsLocked() )
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() )
aList.emplace_back( _( "Status" ), _( "Locked" ) );
ShapeGetMsgPanelInfo( aFrame, aList );

View File

@ -114,7 +114,7 @@ void PCB_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
// Don't use GetShownText() here; we want to show the user the variable references
aList.emplace_back( _( "PCB Text" ), UnescapeString( GetText() ) );
if( IsLocked() )
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() )
aList.emplace_back( _( "Status" ), _( "Locked" ) );
aList.emplace_back( _( "Layer" ), GetLayerName() );

View File

@ -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" ) );
}

View File

@ -590,16 +590,22 @@ void ZONE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>&
}
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<MSG_PANEL_ITEM>&
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: