mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-20 11:21:41 +00:00
Yet more command conversions to ACTIONs.
This commit is contained in:
parent
60d2dc2e90
commit
33773bad4d
common/tool
cvpcb
eeschema
dialogs
eeschema_id.hlibedit
lib_edit_frame.cpplib_edit_frame.hlib_export.cpplibedit.cppmenubar_libedit.cppsymbedit.cpptoolbars_libedit.cpp
tools
ee_actions.hee_inspection_tool.cppee_inspection_tool.hlib_control.cpplib_control.hsch_editor_control.cpp
widgets
gerbview
dialogs
events_called_functions.cppgerbview_frame.cppgerbview_frame.hgerbview_id.hmenubar.cpptoolbars_gerber.cpptools
include/tool
pagelayout_editor
pcbnew
@ -14,6 +14,11 @@ TOOL_ACTION ACTIONS::newLibrary( "common.Control.newLibrary",
|
||||
_( "New Library..." ), _( "Create a new library folder" ),
|
||||
new_generic_xpm );
|
||||
|
||||
TOOL_ACTION ACTIONS::addLibrary( "common.Control.addLibrary",
|
||||
AS_GLOBAL, 0,
|
||||
_( "Add Library..." ), _( "Add an existing library folder" ),
|
||||
add_library_xpm );
|
||||
|
||||
TOOL_ACTION ACTIONS::open( "common.Control.open",
|
||||
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_OPEN ),
|
||||
_( "Open..." ), _( "Open existing document" ),
|
||||
@ -326,6 +331,19 @@ TOOL_ACTION ACTIONS::toggleCursorStyle( "common.Control.toggleCursorStyle",
|
||||
_( "Full-Window Crosshairs" ), _( "Switch display of full-window crosshairs" ),
|
||||
cursor_shape_xpm );
|
||||
|
||||
TOOL_ACTION ACTIONS::highContrastMode( "common.Control.highContrastMode",
|
||||
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_SWITCH_HIGHCONTRAST_MODE ),
|
||||
_( "High Contrast Mode" ), _( "Use high contrast display mode" ),
|
||||
contrast_mode_xpm );
|
||||
|
||||
TOOL_ACTION ACTIONS::highContrastInc( "common.Control.highContrastInc",
|
||||
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_HIGHCONTRAST_INC ),
|
||||
"", "" );
|
||||
|
||||
TOOL_ACTION ACTIONS::highContrastDec( "common.Control.highContrastDec",
|
||||
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_HIGHCONTRAST_DEC ),
|
||||
"", "" );
|
||||
|
||||
TOOL_ACTION ACTIONS::acceleratedGraphics( "common.Control.acceleratedGraphics",
|
||||
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_CANVAS_OPENGL ),
|
||||
_( "Accelerated Graphics" ), _( "Use hardware-accelerated graphics (recommended)" ),
|
||||
|
@ -368,7 +368,6 @@ void CVPCB_MAINFRAME::ToPreviousNA( wxCommandEvent& event )
|
||||
void CVPCB_MAINFRAME::OnOK( wxCommandEvent& aEvent )
|
||||
{
|
||||
SaveFootprintAssociation( false );
|
||||
|
||||
m_modified = false;
|
||||
|
||||
Close( true );
|
||||
@ -378,7 +377,6 @@ void CVPCB_MAINFRAME::OnOK( wxCommandEvent& aEvent )
|
||||
void CVPCB_MAINFRAME::OnSaveAndContinue( wxCommandEvent& aEvent )
|
||||
{
|
||||
SaveFootprintAssociation( true );
|
||||
|
||||
m_modified = false;
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ public:
|
||||
void OnSize( wxSizeEvent& SizeEvent );
|
||||
void OnKeyDown( wxKeyEvent& aEvent );
|
||||
void ReCreateHToolbar();
|
||||
virtual void ReCreateMenuBar() override;
|
||||
void ReCreateMenuBar() override;
|
||||
void ShowChangedLanguage() override;
|
||||
|
||||
void ChangeFocus( bool aMoveRight );
|
||||
|
@ -22,24 +22,17 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file cvpcb/menubar.cpp
|
||||
* @brief (Re)Create the menubar for CvPcb
|
||||
*/
|
||||
|
||||
#include <common_help_msg.h>
|
||||
#include <kiface_i.h>
|
||||
#include <menus_helpers.h>
|
||||
#include <pgm_base.h>
|
||||
|
||||
#include <tool/action_menu.h>
|
||||
#include <tool/actions.h>
|
||||
#include "cvpcb.h"
|
||||
#include "cvpcb_id.h"
|
||||
#include "cvpcb_mainframe.h"
|
||||
|
||||
|
||||
/**
|
||||
* @brief (Re)Create the menubar for the CvPcb mainframe
|
||||
*/
|
||||
void CVPCB_MAINFRAME::ReCreateMenuBar()
|
||||
{
|
||||
// wxWidgets handles the Mac Application menu behind the scenes, but that means
|
||||
|
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Dec 1 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
@ -12,131 +12,128 @@
|
||||
DIALOG_LIB_NEW_COMPONENT_BASE::DIALOG_LIB_NEW_COMPONENT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerTop;
|
||||
bSizerTop = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticTextGeneralSettings = new wxStaticText( this, wxID_ANY, _("General Settings:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextGeneralSettings->Wrap( -1 );
|
||||
m_staticTextGeneralSettings->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
|
||||
bSizerTop->Add( m_staticTextGeneralSettings, 0, wxALL, 5 );
|
||||
|
||||
|
||||
wxFlexGridSizer* fgSizer31;
|
||||
fgSizer31 = new wxFlexGridSizer( 0, 2, 0, 0 );
|
||||
fgSizer31->AddGrowableCol( 1 );
|
||||
fgSizer31->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
m_staticTextName = new wxStaticText( this, wxID_ANY, _("Symbol name:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextName->Wrap( -1 );
|
||||
m_staticTextName->SetToolTip( _("This is the symbol name in library,\nand also the default component value when loaded in the schematic.") );
|
||||
|
||||
fgSizer31->Add( m_staticTextName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
|
||||
fgSizer31->Add( m_staticTextName, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_textName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 100,-1 ), 0 );
|
||||
fgSizer31->Add( m_textName, 1, wxALL|wxEXPAND, 3 );
|
||||
|
||||
fgSizer31->Add( m_textName, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_staticTextDes = new wxStaticText( this, wxID_ANY, _("Default reference designator:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextDes->Wrap( -1 );
|
||||
fgSizer31->Add( m_staticTextDes, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
|
||||
m_textReference = new wxTextCtrl( this, wxID_ANY, _("U"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer31->Add( m_textReference, 0, wxALL|wxEXPAND, 3 );
|
||||
|
||||
fgSizer31->Add( m_textReference, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
fgSizer31->Add( 0, 0, 1, wxEXPAND|wxTOP, 10 );
|
||||
|
||||
|
||||
fgSizer31->Add( 0, 0, 1, wxEXPAND, 10 );
|
||||
|
||||
m_staticTextUnits = new wxStaticText( this, wxID_ANY, _("Number of units per package:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextUnits->Wrap( -1 );
|
||||
fgSizer31->Add( m_staticTextUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
|
||||
m_spinPartCount = new wxSpinCtrl( this, wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 64, 0 );
|
||||
fgSizer31->Add( m_spinPartCount, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
|
||||
fgSizer31->Add( m_spinPartCount, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
|
||||
bSizerTop->Add( fgSizer31, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
wxBoxSizer* bSizer17;
|
||||
bSizer17 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_checkHasConversion = new wxCheckBox( this, wxID_ANY, _("Create symbol with alternate body style (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer17->Add( m_checkHasConversion, 0, wxALL, 5 );
|
||||
|
||||
m_checkIsPowerSymbol = new wxCheckBox( this, wxID_ANY, _("Create symbol as power symbol"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer17->Add( m_checkIsPowerSymbol, 0, wxALL, 5 );
|
||||
|
||||
|
||||
m_checkLockItems = new wxCheckBox( this, wxID_ANY, _("Units are not interchangeable"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer17->Add( m_checkLockItems, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bSizerTop->Add( bSizer17, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizer17->Add( m_checkLockItems, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizer17->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
|
||||
|
||||
m_checkHasConversion = new wxCheckBox( this, wxID_ANY, _("Create symbol with alternate body style (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer17->Add( m_checkHasConversion, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkIsPowerSymbol = new wxCheckBox( this, wxID_ANY, _("Create symbol as power symbol"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bSizer17->Add( m_checkIsPowerSymbol, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerTop->Add( bSizer17, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerTop, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
wxBoxSizer* bSizerBottom;
|
||||
bSizerBottom = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_staticTextPinSettings = new wxStaticText( this, wxID_ANY, _("Pin Settings:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextPinSettings->Wrap( -1 );
|
||||
m_staticTextPinSettings->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
|
||||
bSizerBottom->Add( m_staticTextPinSettings, 0, wxALL, 5 );
|
||||
|
||||
|
||||
|
||||
bSizerBottom->Add( 0, 0, 1, wxEXPAND|wxTOP, 5 );
|
||||
|
||||
wxFlexGridSizer* fgSizer4;
|
||||
fgSizer4 = new wxFlexGridSizer( 0, 2, 0, 55 );
|
||||
fgSizer4->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||
|
||||
|
||||
m_staticText12 = new wxStaticText( this, wxID_ANY, _("Pin text position offset:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticText12->Wrap( -1 );
|
||||
fgSizer4->Add( m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
|
||||
m_spinPinTextPosition = new wxSpinCtrl( this, wxID_ANY, wxT("40"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 1, 100, 40 );
|
||||
fgSizer4->Add( m_spinPinTextPosition, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerBottom->Add( fgSizer4, 0, wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
wxBoxSizer* bSizer19;
|
||||
bSizer19 = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
|
||||
m_checkShowPinNumber = new wxCheckBox( this, wxID_ANY, _("Show pin number text"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkShowPinNumber->SetValue(true);
|
||||
bSizer19->Add( m_checkShowPinNumber, 0, wxALL, 5 );
|
||||
|
||||
m_checkShowPinNumber->SetValue(true);
|
||||
bSizer19->Add( m_checkShowPinNumber, 0, wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkShowPinName = new wxCheckBox( this, wxID_ANY, _("Show pin name text"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkShowPinName->SetValue(true);
|
||||
bSizer19->Add( m_checkShowPinName, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_checkShowPinName->SetValue(true);
|
||||
bSizer19->Add( m_checkShowPinName, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_checkShowPinNameInside = new wxCheckBox( this, wxID_ANY, _("Pin name inside"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkShowPinNameInside->SetValue(true);
|
||||
bSizer19->Add( m_checkShowPinNameInside, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
m_checkShowPinNameInside->SetValue(true);
|
||||
bSizer19->Add( m_checkShowPinNameInside, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerBottom->Add( bSizer19, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
|
||||
bSizerBottom->Add( 0, 10, 0, wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
bSizerMain->Add( bSizerBottom, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
m_sdbSizer = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
||||
m_sdbSizer->AddButton( m_sdbSizerOK );
|
||||
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
|
||||
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
||||
m_sdbSizer->Realize();
|
||||
|
||||
|
||||
bSizerMain->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
this->Layout();
|
||||
bSizerMain->Fit( this );
|
||||
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,12 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Dec 1 2018)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
#ifndef __DIALOG_LIB_NEW_COMPONENT_BASE_H__
|
||||
#define __DIALOG_LIB_NEW_COMPONENT_BASE_H__
|
||||
|
||||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
@ -32,19 +33,17 @@
|
||||
class DIALOG_LIB_NEW_COMPONENT_BASE : public DIALOG_SHIM
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
protected:
|
||||
wxStaticText* m_staticTextGeneralSettings;
|
||||
wxStaticText* m_staticTextName;
|
||||
wxTextCtrl* m_textName;
|
||||
wxStaticText* m_staticTextDes;
|
||||
wxTextCtrl* m_textReference;
|
||||
wxStaticText* m_staticTextUnits;
|
||||
wxSpinCtrl* m_spinPartCount;
|
||||
wxCheckBox* m_checkLockItems;
|
||||
wxCheckBox* m_checkHasConversion;
|
||||
wxCheckBox* m_checkIsPowerSymbol;
|
||||
wxCheckBox* m_checkLockItems;
|
||||
wxStaticText* m_staticTextPinSettings;
|
||||
wxStaticText* m_staticText12;
|
||||
wxSpinCtrl* m_spinPinTextPosition;
|
||||
wxCheckBox* m_checkShowPinNumber;
|
||||
@ -53,11 +52,12 @@ class DIALOG_LIB_NEW_COMPONENT_BASE : public DIALOG_SHIM
|
||||
wxStdDialogButtonSizer* m_sdbSizer;
|
||||
wxButton* m_sdbSizerOK;
|
||||
wxButton* m_sdbSizerCancel;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_LIB_NEW_COMPONENT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Symbol Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
|
||||
DIALOG_LIB_NEW_COMPONENT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("New Symbol"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_LIB_NEW_COMPONENT_BASE();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif //__DIALOG_LIB_NEW_COMPONENT_BASE_H__
|
||||
|
@ -99,14 +99,7 @@ enum id_eeschema_frm
|
||||
ID_ADD_PART_TO_SCHEMATIC,
|
||||
|
||||
/* Library editor: edit events */
|
||||
ID_LIBEDIT_NEW_LIBRARY,
|
||||
ID_LIBEDIT_ADD_LIBRARY,
|
||||
ID_LIBEDIT_SAVE,
|
||||
ID_LIBEDIT_SAVE_AS,
|
||||
ID_LIBEDIT_REVERT,
|
||||
ID_LIBEDIT_NEW_PART,
|
||||
ID_LIBEDIT_EDIT_PART,
|
||||
ID_LIBEDIT_IMPORT_PART,
|
||||
ID_LIBEDIT_EXPORT_PART,
|
||||
ID_LIBEDIT_REMOVE_PART,
|
||||
ID_LIBEDIT_CUT_PART,
|
||||
@ -115,10 +108,7 @@ enum id_eeschema_frm
|
||||
ID_LIBEDIT_DUPLICATE_PART,
|
||||
|
||||
/* Library editor horizontal toolbar IDs. */
|
||||
ID_DE_MORGAN_NORMAL_BUTT,
|
||||
ID_DE_MORGAN_CONVERT_BUTT,
|
||||
ID_LIBEDIT_SYNC_PIN_EDIT,
|
||||
ID_LIBEDIT_CHECK_PART,
|
||||
ID_LIBEDIT_SELECT_PART_NUMBER,
|
||||
|
||||
/* Library editor vertical toolbar IDs. */
|
||||
|
@ -86,11 +86,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME )
|
||||
EVT_SIZE( LIB_EDIT_FRAME::OnSize )
|
||||
|
||||
// Actions
|
||||
EVT_TOOL( ID_LIBEDIT_NEW_LIBRARY, LIB_EDIT_FRAME::OnCreateNewLibrary )
|
||||
EVT_TOOL( ID_LIBEDIT_ADD_LIBRARY, LIB_EDIT_FRAME::OnAddLibrary )
|
||||
EVT_TOOL( ID_LIBEDIT_NEW_PART, LIB_EDIT_FRAME::OnCreateNewPart )
|
||||
EVT_TOOL( ID_LIBEDIT_EDIT_PART, LIB_EDIT_FRAME::OnEditPart )
|
||||
EVT_TOOL( ID_LIBEDIT_IMPORT_PART, LIB_EDIT_FRAME::OnImportPart )
|
||||
EVT_TOOL( ID_LIBEDIT_EXPORT_PART, LIB_EDIT_FRAME::OnExportPart )
|
||||
EVT_TOOL( ID_LIBEDIT_REMOVE_PART, LIB_EDIT_FRAME::OnRemovePart )
|
||||
EVT_TOOL( ID_LIBEDIT_CUT_PART, LIB_EDIT_FRAME::OnCopyCutPart )
|
||||
@ -100,7 +96,6 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME )
|
||||
|
||||
// Main horizontal toolbar.
|
||||
EVT_TOOL( ID_TO_LIBVIEW, LIB_EDIT_FRAME::OnOpenLibraryViewer )
|
||||
EVT_TOOL( ID_LIBEDIT_CHECK_PART, LIB_EDIT_FRAME::OnCheckComponent )
|
||||
EVT_TOOL( ID_LIBEDIT_SYNC_PIN_EDIT, LIB_EDIT_FRAME::OnSyncPinEditClick )
|
||||
EVT_TOOL( ID_ADD_PART_TO_SCHEMATIC, LIB_EDIT_FRAME::OnAddPartToSchematic )
|
||||
|
||||
@ -561,7 +556,7 @@ void LIB_EDIT_FRAME::refreshSchematic()
|
||||
}
|
||||
|
||||
|
||||
bool LIB_EDIT_FRAME::addLibraryFile( bool aCreateNew )
|
||||
bool LIB_EDIT_FRAME::AddLibraryFile( bool aCreateNew )
|
||||
{
|
||||
wxFileName fn = m_libMgr->GetUniqueLibraryName();
|
||||
|
||||
|
@ -205,25 +205,14 @@ public:
|
||||
void OnExportBody( wxCommandEvent& aEvent );
|
||||
|
||||
/**
|
||||
* Creates a new library. The library is added to the project libraries table.
|
||||
* Creates or adds an existing library to the symbol library table.
|
||||
*/
|
||||
void OnCreateNewLibrary( wxCommandEvent& aEvent )
|
||||
{
|
||||
addLibraryFile( true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an existing library. The library is added to the project libraries table.
|
||||
*/
|
||||
void OnAddLibrary( wxCommandEvent& aEvent )
|
||||
{
|
||||
addLibraryFile( false );
|
||||
}
|
||||
bool AddLibraryFile( bool aCreateNew );
|
||||
|
||||
/**
|
||||
* Creates a new part in the selected library.
|
||||
*/
|
||||
void OnCreateNewPart( wxCommandEvent& aEvent );
|
||||
void CreateNewPart();
|
||||
|
||||
/**
|
||||
* Opens the selected part for editing.
|
||||
@ -236,7 +225,7 @@ public:
|
||||
* Or 1 component if there are several.
|
||||
* If the first component is an alias, it will load the corresponding root.
|
||||
*/
|
||||
void OnImportPart( wxCommandEvent& event );
|
||||
void ImportPart();
|
||||
|
||||
/**
|
||||
* Creates a new library and backup the current component in this library or exports
|
||||
@ -286,8 +275,6 @@ public:
|
||||
bool IsSearchTreeShown();
|
||||
void ClearSearchTreeSelection();
|
||||
|
||||
void OnCheckComponent( wxCommandEvent& event );
|
||||
|
||||
void OnUpdateHavePart( wxUpdateUIEvent& aEvent );
|
||||
void OnUpdateSyncPinEdit( wxUpdateUIEvent& event );
|
||||
void OnUpdatePartNumber( wxUpdateUIEvent& event );
|
||||
@ -542,9 +529,6 @@ private:
|
||||
///> Saves the current part.
|
||||
bool saveCurrentPart();
|
||||
|
||||
///> Creates or adds an existing library to the symbol library table.
|
||||
bool addLibraryFile( bool aCreateNew );
|
||||
|
||||
///> Stores the currently modified part in the library manager buffer.
|
||||
void storeCurrentPart();
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include <wx/filename.h>
|
||||
|
||||
|
||||
void LIB_EDIT_FRAME::OnImportPart( wxCommandEvent& event )
|
||||
void LIB_EDIT_FRAME::ImportPart()
|
||||
{
|
||||
wxString msg;
|
||||
wxString libName = getTargetLib();
|
||||
|
@ -277,7 +277,7 @@ void LIB_EDIT_FRAME::OnSaveAll()
|
||||
}
|
||||
|
||||
|
||||
void LIB_EDIT_FRAME::OnCreateNewPart( wxCommandEvent& event )
|
||||
void LIB_EDIT_FRAME::CreateNewPart()
|
||||
{
|
||||
m_toolManager->RunAction( ACTIONS::cancelInteractive, true );
|
||||
wxString lib = getTargetLib();
|
||||
@ -877,39 +877,3 @@ bool LIB_EDIT_FRAME::saveAllLibraries( bool aRequireConfirmation )
|
||||
}
|
||||
|
||||
|
||||
void LIB_EDIT_FRAME::DisplayCmpDoc()
|
||||
{
|
||||
LIB_PART* part = GetCurPart();
|
||||
|
||||
EDA_DRAW_FRAME::ClearMsgPanel();
|
||||
|
||||
if( !part )
|
||||
return;
|
||||
|
||||
LIB_ALIAS* alias = part->GetAlias( part->GetName() );
|
||||
wxString msg = part->GetName();
|
||||
|
||||
AppendMsgPanel( _( "Name" ), msg, BLUE, 8 );
|
||||
|
||||
static wxChar UnitLetter[] = wxT( "?ABCDEFGHIJKLMNOPQRSTUVWXYZ" );
|
||||
msg = UnitLetter[m_unit];
|
||||
|
||||
AppendMsgPanel( _( "Unit" ), msg, BROWN, 8 );
|
||||
|
||||
if( m_convert > 1 )
|
||||
msg = _( "Convert" );
|
||||
else
|
||||
msg = _( "Normal" );
|
||||
|
||||
AppendMsgPanel( _( "Body" ), msg, GREEN, 8 );
|
||||
|
||||
if( part->IsPower() )
|
||||
msg = _( "Power Symbol" );
|
||||
else
|
||||
msg = _( "Symbol" );
|
||||
|
||||
AppendMsgPanel( _( "Type" ), msg, MAGENTA, 8 );
|
||||
AppendMsgPanel( _( "Description" ), alias->GetDescription(), CYAN, 8 );
|
||||
AppendMsgPanel( _( "Key words" ), alias->GetKeyWords(), DARKDARKGRAY );
|
||||
AppendMsgPanel( _( "Datasheet" ), alias->GetDocFileName(), DARKDARKGRAY );
|
||||
}
|
||||
|
@ -61,30 +61,18 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||
//
|
||||
CONDITIONAL_MENU* fileMenu = new CONDITIONAL_MENU( false, selTool );
|
||||
|
||||
fileMenu->AddItem( ID_LIBEDIT_NEW_LIBRARY,
|
||||
_( "New Library..." ),
|
||||
_( "Creates an empty library" ),
|
||||
new_library_xpm, EE_CONDITIONS::ShowAlways );
|
||||
fileMenu->AddItem( ID_LIBEDIT_ADD_LIBRARY,
|
||||
_( "Add Library..." ),
|
||||
_( "Adds a previously created library" ),
|
||||
add_library_xpm, EE_CONDITIONS::ShowAlways );
|
||||
fileMenu->AddItem( ID_LIBEDIT_NEW_PART,
|
||||
AddHotkeyName( _( "New Symbol..." ), m_hotkeysDescrList, HK_NEW ),
|
||||
_( "Create a new symbol" ),
|
||||
new_component_xpm, EE_CONDITIONS::ShowAlways );
|
||||
fileMenu->AddItem( ACTIONS::newLibrary, EE_CONDITIONS::ShowAlways );
|
||||
fileMenu->AddItem( ACTIONS::addLibrary, EE_CONDITIONS::ShowAlways );
|
||||
fileMenu->AddItem( EE_ACTIONS::newSymbol, EE_CONDITIONS::ShowAlways );
|
||||
|
||||
fileMenu->AddSeparator();
|
||||
fileMenu->AddItem( ACTIONS::save, modifiedDocumentCondition );
|
||||
fileMenu->AddItem( ACTIONS::saveAs, EE_CONDITIONS::ShowAlways );
|
||||
fileMenu->AddItem( ACTIONS::saveCopyAs, EE_CONDITIONS::ShowAlways );
|
||||
fileMenu->AddItem( ACTIONS::saveAll, EE_CONDITIONS::ShowAlways );
|
||||
fileMenu->AddItem( ACTIONS::revert, modifiedDocumentCondition );
|
||||
|
||||
fileMenu->AddSeparator();
|
||||
fileMenu->AddItem( ID_LIBEDIT_IMPORT_PART,
|
||||
_( "Import Symbol..." ),
|
||||
_( "Import a symbol to the current library" ),
|
||||
import_part_xpm, EE_CONDITIONS::ShowAlways );
|
||||
fileMenu->AddItem( EE_ACTIONS::importSymbol, EE_CONDITIONS::ShowAlways );
|
||||
|
||||
// Export submenu
|
||||
ACTION_MENU* submenuExport = new ACTION_MENU();
|
||||
@ -209,12 +197,7 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
|
||||
};
|
||||
|
||||
inspectMenu->AddItem( EE_ACTIONS::showDatasheet, datasheetAvailableCondition );
|
||||
|
||||
AddMenuItem( inspectMenu,
|
||||
ID_LIBEDIT_CHECK_PART,
|
||||
_( "Electrical Rules Checker" ),
|
||||
_( "Check for duplicate and off-grid pins" ),
|
||||
KiBitmap( erc_xpm ) );
|
||||
inspectMenu->AddItem( EE_ACTIONS::runERC, EE_CONDITIONS::ShowAlways );
|
||||
|
||||
inspectMenu->Resolve();
|
||||
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include <sch_legacy_plugin.h>
|
||||
#include <properties.h>
|
||||
#include <view/view.h>
|
||||
#include <dialogs/dialog_display_info_HTML_base.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tools/ee_selection_tool.h>
|
||||
|
||||
@ -203,147 +202,39 @@ void LIB_EDIT_FRAME::SaveOneSymbol()
|
||||
}
|
||||
|
||||
|
||||
// helper function to sort pins by pin num
|
||||
bool sort_by_pin_number( const LIB_PIN* ref, const LIB_PIN* tst )
|
||||
void LIB_EDIT_FRAME::DisplayCmpDoc()
|
||||
{
|
||||
// Use number as primary key
|
||||
int test = ref->GetNumber().Cmp( tst->GetNumber() );
|
||||
LIB_PART* part = GetCurPart();
|
||||
|
||||
// Use DeMorgan variant as secondary key
|
||||
if( test == 0 )
|
||||
test = ref->GetConvert() - tst->GetConvert();
|
||||
|
||||
// Use unit as tertiary key
|
||||
if( test == 0 )
|
||||
test = ref->GetUnit() - tst->GetUnit();
|
||||
|
||||
return test < 0;
|
||||
}
|
||||
|
||||
|
||||
void LIB_EDIT_FRAME::OnCheckComponent( wxCommandEvent& event )
|
||||
{
|
||||
LIB_PART* part = GetCurPart();
|
||||
EDA_DRAW_FRAME::ClearMsgPanel();
|
||||
|
||||
if( !part )
|
||||
return;
|
||||
|
||||
wxRealPoint curr_grid_size = GetScreen()->GetGridSize();
|
||||
const int min_grid_size = 25;
|
||||
const int grid_size = KiROUND( curr_grid_size.x );
|
||||
const int clamped_grid_size = ( grid_size < min_grid_size ) ? min_grid_size : grid_size;
|
||||
LIB_ALIAS* alias = part->GetAlias( part->GetName() );
|
||||
wxString msg = part->GetName();
|
||||
|
||||
LIB_PINS pinList;
|
||||
AppendMsgPanel( _( "Name" ), msg, BLUE, 8 );
|
||||
|
||||
part->GetPins( pinList );
|
||||
static wxChar UnitLetter[] = wxT( "?ABCDEFGHIJKLMNOPQRSTUVWXYZ" );
|
||||
msg = UnitLetter[m_unit];
|
||||
|
||||
if( pinList.size() == 0 )
|
||||
{
|
||||
DisplayInfoMessage( this, _( "No pins!" ) );
|
||||
return;
|
||||
}
|
||||
AppendMsgPanel( _( "Unit" ), msg, BROWN, 8 );
|
||||
|
||||
// Sort pins by pin num, so 2 duplicate pins
|
||||
// (pins with the same number) will be consecutive in list
|
||||
sort( pinList.begin(), pinList.end(), sort_by_pin_number );
|
||||
|
||||
// Test for duplicates:
|
||||
DIALOG_DISPLAY_HTML_TEXT_BASE error_display( this, wxID_ANY,
|
||||
_( "Marker Information" ),
|
||||
wxDefaultPosition,
|
||||
wxSize( 750, 600 ) );
|
||||
|
||||
int dup_error = 0;
|
||||
|
||||
for( unsigned ii = 1; ii < pinList.size(); ii++ )
|
||||
{
|
||||
LIB_PIN* curr_pin = pinList[ii];
|
||||
LIB_PIN* pin = pinList[ii - 1];
|
||||
|
||||
if( pin->GetNumber() != curr_pin->GetNumber()
|
||||
|| pin->GetConvert() != curr_pin->GetConvert() )
|
||||
continue;
|
||||
|
||||
dup_error++;
|
||||
|
||||
/* TODO I dare someone to find a way to make happy translators on
|
||||
this thing! Lorenzo */
|
||||
|
||||
wxString msg = wxString::Format( _(
|
||||
"<b>Duplicate pin %s</b> \"%s\" at location <b>(%.3f, %.3f)</b>"
|
||||
" conflicts with pin %s \"%s\" at location <b>(%.3f, %.3f)</b>" ),
|
||||
GetChars( curr_pin->GetNumber() ),
|
||||
GetChars( curr_pin->GetName() ),
|
||||
curr_pin->GetPosition().x / 1000.0,
|
||||
-curr_pin->GetPosition().y / 1000.0,
|
||||
GetChars( pin->GetNumber() ),
|
||||
GetChars( pin->GetName() ),
|
||||
pin->GetPosition().x / 1000.0,
|
||||
-pin->GetPosition().y / 1000.0
|
||||
);
|
||||
|
||||
if( part->GetUnitCount() > 1 )
|
||||
{
|
||||
msg += wxString::Format( _( " in units %c and %c" ),
|
||||
'A' + curr_pin->GetUnit() - 1,
|
||||
'A' + pin->GetUnit() - 1 );
|
||||
}
|
||||
|
||||
if( m_showDeMorgan )
|
||||
{
|
||||
if( curr_pin->GetConvert() )
|
||||
msg += _( " of converted" );
|
||||
else
|
||||
msg += _( " of normal" );
|
||||
}
|
||||
|
||||
msg += wxT( ".<br>" );
|
||||
|
||||
error_display.m_htmlWindow->AppendToPage( msg );
|
||||
}
|
||||
|
||||
// Test for off grid pins:
|
||||
int offgrid_error = 0;
|
||||
|
||||
for( unsigned ii = 0; ii < pinList.size(); ii++ )
|
||||
{
|
||||
LIB_PIN* pin = pinList[ii];
|
||||
|
||||
if( ( (pin->GetPosition().x % clamped_grid_size) == 0 ) &&
|
||||
( (pin->GetPosition().y % clamped_grid_size) == 0 ) )
|
||||
continue;
|
||||
|
||||
// "pin" is off grid here.
|
||||
offgrid_error++;
|
||||
|
||||
wxString msg = wxString::Format( _(
|
||||
"<b>Off grid pin %s</b> \"%s\" at location <b>(%.3f, %.3f)</b>" ),
|
||||
GetChars( pin->GetNumber() ),
|
||||
GetChars( pin->GetName() ),
|
||||
pin->GetPosition().x / 1000.0,
|
||||
-pin->GetPosition().y / 1000.0
|
||||
);
|
||||
|
||||
if( part->GetUnitCount() > 1 )
|
||||
{
|
||||
msg += wxString::Format( _( " in symbol %c" ), 'A' + pin->GetUnit() - 1 );
|
||||
}
|
||||
|
||||
if( m_showDeMorgan )
|
||||
{
|
||||
if( pin->GetConvert() )
|
||||
msg += _( " of converted" );
|
||||
else
|
||||
msg += _( " of normal" );
|
||||
}
|
||||
|
||||
msg += wxT( ".<br>" );
|
||||
|
||||
error_display.m_htmlWindow->AppendToPage( msg );
|
||||
}
|
||||
|
||||
if( !dup_error && !offgrid_error )
|
||||
DisplayInfoMessage( this, _( "No off grid or duplicate pins were found." ) );
|
||||
if( m_convert > 1 )
|
||||
msg = _( "Convert" );
|
||||
else
|
||||
error_display.ShowModal();
|
||||
msg = _( "Normal" );
|
||||
|
||||
AppendMsgPanel( _( "Body" ), msg, GREEN, 8 );
|
||||
|
||||
if( part->IsPower() )
|
||||
msg = _( "Power Symbol" );
|
||||
else
|
||||
msg = _( "Symbol" );
|
||||
|
||||
AppendMsgPanel( _( "Type" ), msg, MAGENTA, 8 );
|
||||
AppendMsgPanel( _( "Description" ), alias->GetDescription(), CYAN, 8 );
|
||||
AppendMsgPanel( _( "Key words" ), alias->GetKeyWords(), DARKDARKGRAY );
|
||||
AppendMsgPanel( _( "Datasheet" ), alias->GetDocFileName(), DARKDARKGRAY );
|
||||
}
|
||||
|
@ -85,10 +85,7 @@ void LIB_EDIT_FRAME::ReCreateHToolbar()
|
||||
KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT );
|
||||
|
||||
// Set up toolbar
|
||||
m_mainToolBar->AddTool( ID_LIBEDIT_NEW_PART, wxEmptyString,
|
||||
KiScaledBitmap( new_component_xpm, this ),
|
||||
_( "Create new symbol" ) );
|
||||
|
||||
m_mainToolBar->Add( EE_ACTIONS::newSymbol );
|
||||
m_mainToolBar->Add( ACTIONS::saveAll );
|
||||
|
||||
m_mainToolBar->AddSeparator();
|
||||
@ -107,11 +104,8 @@ void LIB_EDIT_FRAME::ReCreateHToolbar()
|
||||
m_mainToolBar->Add( EE_ACTIONS::pinTable );
|
||||
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
|
||||
m_mainToolBar->Add( EE_ACTIONS::showDatasheet );
|
||||
|
||||
m_mainToolBar->AddTool( ID_LIBEDIT_CHECK_PART, wxEmptyString, KiScaledBitmap( erc_xpm, this ),
|
||||
_( "Check duplicate and off grid pins" ) );
|
||||
m_mainToolBar->Add( EE_ACTIONS::runERC );
|
||||
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
m_mainToolBar->Add( EE_ACTIONS::showDeMorganStandard, ACTION_TOOLBAR::TOGGLE );
|
||||
|
@ -166,10 +166,16 @@ public:
|
||||
static TOOL_ACTION generateBOM;
|
||||
static TOOL_ACTION runSimulation;
|
||||
|
||||
// Miscellaneous
|
||||
// Library management
|
||||
static TOOL_ACTION newSymbol;
|
||||
static TOOL_ACTION importSymbol;
|
||||
|
||||
// Hierarchy navigation
|
||||
static TOOL_ACTION enterSheet;
|
||||
static TOOL_ACTION leaveSheet;
|
||||
static TOOL_ACTION navigateHierarchy;
|
||||
|
||||
// Miscellaneous
|
||||
static TOOL_ACTION cleanupSheetPins;
|
||||
static TOOL_ACTION toggleHiddenPins;
|
||||
static TOOL_ACTION symbolProperties;
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include <eda_doc.h>
|
||||
#include <invoke_sch_dialog.h>
|
||||
#include <project.h>
|
||||
#include <dialogs/dialog_display_info_HTML_base.h>
|
||||
|
||||
TOOL_ACTION EE_ACTIONS::runERC( "eeschame.InspectionTool.runERC",
|
||||
AS_GLOBAL, 0,
|
||||
@ -92,19 +93,155 @@ bool EE_INSPECTION_TOOL::Init()
|
||||
|
||||
int EE_INSPECTION_TOOL::RunERC( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
SCH_EDIT_FRAME* editFrame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame );
|
||||
wxWindow* erc = wxWindow::FindWindowById( ID_DIALOG_ERC, m_frame );
|
||||
if( m_frame->IsType( FRAME_SCH_LIB_EDITOR ) )
|
||||
{
|
||||
checkPart( static_cast<LIB_EDIT_FRAME*>( m_frame )->GetCurPart() );
|
||||
}
|
||||
else if( m_frame->IsType( FRAME_SCH ) )
|
||||
{
|
||||
wxWindow* erc = wxWindow::FindWindowById( ID_DIALOG_ERC, m_frame );
|
||||
|
||||
if( erc )
|
||||
// Bring it to the top if already open. Dual monitor users need this.
|
||||
erc->Raise();
|
||||
else if( editFrame )
|
||||
InvokeDialogERC( editFrame );
|
||||
if( erc )
|
||||
// Bring it to the top if already open. Dual monitor users need this.
|
||||
erc->Raise();
|
||||
else
|
||||
InvokeDialogERC( static_cast<SCH_EDIT_FRAME*>( m_frame ) );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// helper function to sort pins by pin num
|
||||
bool sort_by_pin_number( const LIB_PIN* ref, const LIB_PIN* tst )
|
||||
{
|
||||
// Use number as primary key
|
||||
int test = ref->GetNumber().Cmp( tst->GetNumber() );
|
||||
|
||||
// Use DeMorgan variant as secondary key
|
||||
if( test == 0 )
|
||||
test = ref->GetConvert() - tst->GetConvert();
|
||||
|
||||
// Use unit as tertiary key
|
||||
if( test == 0 )
|
||||
test = ref->GetUnit() - tst->GetUnit();
|
||||
|
||||
return test < 0;
|
||||
}
|
||||
|
||||
|
||||
void EE_INSPECTION_TOOL::checkPart( LIB_PART* aPart )
|
||||
{
|
||||
if( !aPart )
|
||||
return;
|
||||
|
||||
wxString msg;
|
||||
wxRealPoint curr_grid_size = m_frame->GetScreen()->GetGridSize();
|
||||
const int min_grid_size = 25;
|
||||
const int grid_size = KiROUND( curr_grid_size.x );
|
||||
const int clamped_grid_size = ( grid_size < min_grid_size ) ? min_grid_size : grid_size;
|
||||
LIB_PINS pinList;
|
||||
|
||||
aPart->GetPins( pinList );
|
||||
|
||||
if( pinList.empty() )
|
||||
{
|
||||
DisplayInfoMessage( m_frame, _( "No pins!" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
// Sort pins by pin num, so 2 duplicate pins
|
||||
// (pins with the same number) will be consecutive in list
|
||||
sort( pinList.begin(), pinList.end(), sort_by_pin_number );
|
||||
|
||||
// Test for duplicates:
|
||||
DIALOG_DISPLAY_HTML_TEXT_BASE error_display( m_frame, wxID_ANY, _( "Marker Information" ),
|
||||
wxDefaultPosition, wxSize( 750, 600 ) );
|
||||
|
||||
int dup_error = 0;
|
||||
|
||||
for( unsigned ii = 1; ii < pinList.size(); ii++ )
|
||||
{
|
||||
LIB_PIN* pin = pinList[ii - 1];
|
||||
LIB_PIN* next = pinList[ii];
|
||||
|
||||
if( pin->GetNumber() != next->GetNumber() || pin->GetConvert() != next->GetConvert() )
|
||||
continue;
|
||||
|
||||
dup_error++;
|
||||
|
||||
/* TODO I dare someone to find a way to make happy translators on
|
||||
this thing! Lorenzo */
|
||||
|
||||
msg = wxString::Format( _( "<b>Duplicate pin %s</b> \"%s\" at location <b>(%.3f, %.3f)</b>"
|
||||
" conflicts with pin %s \"%s\" at location <b>(%.3f, %.3f)</b>" ),
|
||||
next->GetNumber(),
|
||||
next->GetName(),
|
||||
next->GetPosition().x / 1000.0, -next->GetPosition().y / 1000.0,
|
||||
pin->GetNumber(),
|
||||
pin->GetName(),
|
||||
pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 );
|
||||
|
||||
if( aPart->GetUnitCount() > 1 )
|
||||
{
|
||||
msg += wxString::Format( _( " in units %c and %c" ),
|
||||
'A' + next->GetUnit() - 1,
|
||||
'A' + pin->GetUnit() - 1 );
|
||||
}
|
||||
|
||||
if( aPart->HasConversion() )
|
||||
{
|
||||
if( next->GetConvert() )
|
||||
msg += _( " of converted" );
|
||||
else
|
||||
msg += _( " of normal" );
|
||||
}
|
||||
|
||||
msg += wxT( ".<br>" );
|
||||
|
||||
error_display.m_htmlWindow->AppendToPage( msg );
|
||||
}
|
||||
|
||||
// Test for off grid pins:
|
||||
int offgrid_error = 0;
|
||||
|
||||
for( LIB_PIN* pin : pinList )
|
||||
{
|
||||
if( ( (pin->GetPosition().x % clamped_grid_size) == 0 ) &&
|
||||
( (pin->GetPosition().y % clamped_grid_size) == 0 ) )
|
||||
continue;
|
||||
|
||||
// "pin" is off grid here.
|
||||
offgrid_error++;
|
||||
|
||||
msg = wxString::Format( _( "<b>Off grid pin %s</b> \"%s\" at location <b>(%.3f, %.3f)</b>" ),
|
||||
pin->GetNumber(),
|
||||
pin->GetName(),
|
||||
pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 );
|
||||
|
||||
if( aPart->GetUnitCount() > 1 )
|
||||
msg += wxString::Format( _( " in symbol %c" ), 'A' + pin->GetUnit() - 1 );
|
||||
|
||||
if( aPart->HasConversion() )
|
||||
{
|
||||
if( pin->GetConvert() )
|
||||
msg += _( " of converted" );
|
||||
else
|
||||
msg += _( " of normal" );
|
||||
}
|
||||
|
||||
msg += wxT( ".<br>" );
|
||||
|
||||
error_display.m_htmlWindow->AppendToPage( msg );
|
||||
}
|
||||
|
||||
if( !dup_error && !offgrid_error )
|
||||
DisplayInfoMessage( m_frame, _( "No off grid or duplicate pins were found." ) );
|
||||
else
|
||||
error_display.ShowModal();
|
||||
}
|
||||
|
||||
|
||||
int EE_INSPECTION_TOOL::RunSimulation( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
#ifdef KICAD_SPICE
|
||||
@ -125,12 +262,9 @@ int EE_INSPECTION_TOOL::ShowDatasheet( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
wxString datasheet;
|
||||
|
||||
LIB_EDIT_FRAME* libEditFrame = dynamic_cast<LIB_EDIT_FRAME*>( m_frame );
|
||||
LIB_VIEW_FRAME* libViewFrame = dynamic_cast<LIB_VIEW_FRAME*>( m_frame );
|
||||
|
||||
if( libEditFrame )
|
||||
if( m_frame->IsType( FRAME_SCH_LIB_EDITOR ) )
|
||||
{
|
||||
LIB_PART* part = libEditFrame->GetCurPart();
|
||||
LIB_PART* part = static_cast<LIB_EDIT_FRAME*>( m_frame )->GetCurPart();
|
||||
|
||||
if( !part )
|
||||
return 0;
|
||||
@ -155,16 +289,16 @@ int EE_INSPECTION_TOOL::ShowDatasheet( const TOOL_EVENT& aEvent )
|
||||
else
|
||||
datasheet = part->GetAlias( 0 )->GetDocFileName();
|
||||
}
|
||||
else if( libViewFrame )
|
||||
else if( m_frame->IsType( FRAME_SCH_VIEWER ) || m_frame->IsType( FRAME_SCH_VIEWER_MODAL ) )
|
||||
{
|
||||
LIB_ALIAS* entry = libViewFrame->GetSelectedAlias();
|
||||
LIB_ALIAS* entry = static_cast<LIB_VIEW_FRAME*>( m_frame )->GetSelectedAlias();
|
||||
|
||||
if( !entry )
|
||||
return 0;
|
||||
|
||||
datasheet = entry->GetDocFileName();
|
||||
}
|
||||
else
|
||||
else if( m_frame->IsType( FRAME_SCH ) )
|
||||
{
|
||||
SELECTION& selection = m_selectionTool->RequestSelection( EE_COLLECTOR::ComponentsOnly );
|
||||
|
||||
|
@ -51,6 +51,8 @@ public:
|
||||
int UpdateMessagePanel( const TOOL_EVENT& aEvent );
|
||||
|
||||
private:
|
||||
void checkPart( LIB_PART* aPart );
|
||||
|
||||
///> @copydoc TOOL_INTERACTIVE::setTransitions();
|
||||
void setTransitions() override;
|
||||
};
|
||||
|
@ -42,6 +42,31 @@ TOOL_ACTION EE_ACTIONS::showComponentTree( "eeschema.SymbolLibraryControl.showCo
|
||||
search_tree_xpm );
|
||||
|
||||
|
||||
int LIB_CONTROL::AddLibrary( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
bool createNew = aEvent.IsAction( &ACTIONS::newLibrary );
|
||||
|
||||
if( m_frame->IsType( FRAME_SCH_LIB_EDITOR ) )
|
||||
static_cast<LIB_EDIT_FRAME*>( m_frame )->AddLibraryFile( createNew );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int LIB_CONTROL::AddSymbol( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
if( m_frame->IsType( FRAME_SCH_LIB_EDITOR ) )
|
||||
{
|
||||
if( aEvent.IsAction( &EE_ACTIONS::newSymbol ) )
|
||||
static_cast<LIB_EDIT_FRAME*>( m_frame )->CreateNewPart();
|
||||
else if( aEvent.IsAction( &EE_ACTIONS::importSymbol ) )
|
||||
static_cast<LIB_EDIT_FRAME*>( m_frame )->ImportPart();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int LIB_CONTROL::Save( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
if( m_frame->IsType( FRAME_SCH_LIB_EDITOR ) )
|
||||
@ -140,8 +165,14 @@ int LIB_CONTROL::ShowElectricalTypes( const TOOL_EVENT& aEvent )
|
||||
|
||||
void LIB_CONTROL::setTransitions()
|
||||
{
|
||||
Go( &LIB_CONTROL::AddLibrary, ACTIONS::newLibrary.MakeEvent() );
|
||||
Go( &LIB_CONTROL::AddLibrary, ACTIONS::addLibrary.MakeEvent() );
|
||||
Go( &LIB_CONTROL::AddSymbol, EE_ACTIONS::newSymbol.MakeEvent() );
|
||||
Go( &LIB_CONTROL::AddSymbol, EE_ACTIONS::importSymbol.MakeEvent() );
|
||||
|
||||
Go( &LIB_CONTROL::Save, ACTIONS::save.MakeEvent() );
|
||||
Go( &LIB_CONTROL::SaveAs, ACTIONS::saveAs.MakeEvent() );
|
||||
Go( &LIB_CONTROL::SaveAs, ACTIONS::saveAs.MakeEvent() ); // for libraries
|
||||
Go( &LIB_CONTROL::SaveAs, ACTIONS::saveCopyAs.MakeEvent() ); // for symbols
|
||||
Go( &LIB_CONTROL::SaveAll, ACTIONS::saveAll.MakeEvent() );
|
||||
Go( &LIB_CONTROL::Revert, ACTIONS::revert.MakeEvent() );
|
||||
|
||||
|
@ -44,6 +44,9 @@ public:
|
||||
|
||||
virtual ~LIB_CONTROL() { }
|
||||
|
||||
int AddLibrary( const TOOL_EVENT& aEvent );
|
||||
int AddSymbol( const TOOL_EVENT& aEvent );
|
||||
|
||||
int Save( const TOOL_EVENT& aEvent );
|
||||
int SaveAs( const TOOL_EVENT& aEvent );
|
||||
int SaveAll( const TOOL_EVENT& aEvent );
|
||||
|
@ -131,6 +131,16 @@ TOOL_ACTION EE_ACTIONS::generateBOM( "eeschema.EditorControl.generateBOM",
|
||||
_( "Generate BOM..." ), _( "Generate a bill of materials for the current schematic" ),
|
||||
bom_xpm );
|
||||
|
||||
TOOL_ACTION EE_ACTIONS::newSymbol( "eeschema.EditorControl.newSymbol",
|
||||
AS_GLOBAL, 0,
|
||||
_( "New Symbol..." ), _( "Create a new symbol" ),
|
||||
new_component_xpm );
|
||||
|
||||
TOOL_ACTION EE_ACTIONS::importSymbol( "eeschema.EditorControl.importSymbol",
|
||||
AS_GLOBAL, 0,
|
||||
_( "Import Symbol..." ), _( "Import a symbol to the current library" ),
|
||||
import_part_xpm );
|
||||
|
||||
TOOL_ACTION EE_ACTIONS::enterSheet( "eeschema.EditorControl.enterSheet",
|
||||
AS_GLOBAL, 0,
|
||||
_( "Enter Sheet" ), _( "Display the selected sheet's contents in the Eeschema window" ),
|
||||
|
@ -30,16 +30,20 @@
|
||||
#include <lib_edit_frame.h>
|
||||
#include <symbol_lib_table.h>
|
||||
#include <menus_helpers.h>
|
||||
|
||||
#include <tool/action_menu.h>
|
||||
#include <tool/actions.h>
|
||||
#include <tools/ee_actions.h>
|
||||
|
||||
SYMBOL_TREE_PANE::SYMBOL_TREE_PANE( LIB_EDIT_FRAME* aParent, LIB_MANAGER* aLibMgr )
|
||||
: wxPanel( aParent ),
|
||||
m_libEditFrame( aParent ), m_tree( nullptr ), m_libMgr( aLibMgr )
|
||||
m_libEditFrame( aParent ),
|
||||
m_tree( nullptr ),
|
||||
m_libMgr( aLibMgr )
|
||||
{
|
||||
// Create widgets
|
||||
wxBoxSizer* boxSizer = new wxBoxSizer( wxVERTICAL );
|
||||
m_tree = new LIB_TREE( this, &SYMBOL_LIB_TABLE::GetGlobalLibTable(),
|
||||
m_libMgr->GetAdapter(), LIB_TREE::SEARCH );
|
||||
m_tree = new LIB_TREE( this, &SYMBOL_LIB_TABLE::GetGlobalLibTable(), m_libMgr->GetAdapter(),
|
||||
LIB_TREE::SEARCH );
|
||||
boxSizer->Add( m_tree, 1, wxEXPAND, 5 );
|
||||
|
||||
SetSizer( boxSizer ); // should remove the previous sizer according to wxWidgets docs
|
||||
@ -47,42 +51,32 @@ SYMBOL_TREE_PANE::SYMBOL_TREE_PANE( LIB_EDIT_FRAME* aParent, LIB_MANAGER* aLibMg
|
||||
boxSizer->Fit( this );
|
||||
|
||||
// Setup right click-context menus
|
||||
std::unique_ptr<wxMenu> menuLibrary = std::make_unique<wxMenu>();
|
||||
std::unique_ptr<ACTION_MENU> menuLibrary = std::make_unique<ACTION_MENU>();
|
||||
|
||||
AddMenuItem( menuLibrary.get(), ID_LIBEDIT_NEW_LIBRARY, _( "&New Library..." ),
|
||||
KiBitmap( new_library_xpm ) );
|
||||
AddMenuItem( menuLibrary.get(), ID_LIBEDIT_ADD_LIBRARY, _( "&Add Library..." ),
|
||||
KiBitmap( add_library_xpm ) );
|
||||
AddMenuItem( menuLibrary.get(), ID_LIBEDIT_SAVE, _( "&Save" ),
|
||||
KiBitmap( save_xpm ) );
|
||||
AddMenuItem( menuLibrary.get(), ID_LIBEDIT_SAVE_AS, _( "Save As..." ),
|
||||
KiBitmap( save_as_xpm ) );
|
||||
AddMenuItem( menuLibrary.get(), ID_LIBEDIT_REVERT, _( "Revert" ),
|
||||
KiBitmap( undo_xpm ) );
|
||||
menuLibrary->Add( ACTIONS::newLibrary );
|
||||
menuLibrary->Add( ACTIONS::addLibrary );
|
||||
menuLibrary->Add( ACTIONS::save );
|
||||
menuLibrary->Add( ACTIONS::saveAs );
|
||||
menuLibrary->Add( ACTIONS::revert );
|
||||
|
||||
menuLibrary->AppendSeparator();
|
||||
AddMenuItem( menuLibrary.get(), ID_LIBEDIT_NEW_PART, _( "New Sy&mbol..." ),
|
||||
KiBitmap( new_component_xpm ) );
|
||||
AddMenuItem( menuLibrary.get(), ID_LIBEDIT_IMPORT_PART, _( "&Import Symbol..." ),
|
||||
KiBitmap( import_part_xpm ) );
|
||||
menuLibrary->Add( EE_ACTIONS::newSymbol );
|
||||
menuLibrary->Add( EE_ACTIONS::importSymbol );
|
||||
AddMenuItem( menuLibrary.get(), ID_LIBEDIT_PASTE_PART, _( "Paste Symbol" ),
|
||||
KiBitmap( paste_xpm ) );
|
||||
|
||||
std::unique_ptr<wxMenu> menuPart = std::make_unique<wxMenu>();
|
||||
AddMenuItem( menuPart.get(), ID_LIBEDIT_EDIT_PART, _( "&Edit Symbol" ),
|
||||
std::unique_ptr<ACTION_MENU> menuPart = std::make_unique<ACTION_MENU>();
|
||||
AddMenuItem( menuPart.get(), ID_LIBEDIT_EDIT_PART, _( "Edit Symbol" ),
|
||||
KiBitmap( edit_xpm ) );
|
||||
|
||||
menuPart->AppendSeparator();
|
||||
AddMenuItem( menuPart.get(), ID_LIBEDIT_SAVE, _( "&Save" ),
|
||||
KiBitmap( save_xpm ) );
|
||||
AddMenuItem( menuPart.get(), ID_LIBEDIT_SAVE_AS, _( "Save a Copy As..." ),
|
||||
KiBitmap( save_xpm ) );
|
||||
menuPart->Add( ACTIONS::save );
|
||||
menuPart->Add( ACTIONS::saveCopyAs );
|
||||
AddMenuItem( menuPart.get(), ID_LIBEDIT_DUPLICATE_PART, _( "Duplicate" ),
|
||||
KiBitmap( duplicate_xpm ) );
|
||||
AddMenuItem( menuPart.get(), ID_LIBEDIT_REMOVE_PART, _( "Delete" ),
|
||||
KiBitmap( delete_xpm ) );
|
||||
AddMenuItem( menuPart.get(), ID_LIBEDIT_REVERT, _( "Revert" ),
|
||||
KiBitmap( undo_xpm ) );
|
||||
menuPart->Add( ACTIONS::revert );
|
||||
|
||||
menuPart->AppendSeparator();
|
||||
AddMenuItem( menuPart.get(), ID_LIBEDIT_CUT_PART, _( "Cut" ),
|
||||
@ -95,11 +89,9 @@ SYMBOL_TREE_PANE::SYMBOL_TREE_PANE( LIB_EDIT_FRAME* aParent, LIB_MANAGER* aLibMg
|
||||
KiBitmap( export_part_xpm ) );
|
||||
|
||||
// Menu displayed when nothing is selected
|
||||
std::unique_ptr<wxMenu> menuNoSelection = std::make_unique<wxMenu>();
|
||||
AddMenuItem( menuNoSelection.get(), ID_LIBEDIT_NEW_LIBRARY, _( "&New Library..." ),
|
||||
KiBitmap( new_library_xpm ) );
|
||||
AddMenuItem( menuNoSelection.get(), ID_LIBEDIT_ADD_LIBRARY, _( "&Add Library..." ),
|
||||
KiBitmap( add_library_xpm ) );
|
||||
std::unique_ptr<ACTION_MENU> menuNoSelection = std::make_unique<ACTION_MENU>();
|
||||
menuLibrary->Add( ACTIONS::newLibrary );
|
||||
menuLibrary->Add( ACTIONS::addLibrary );
|
||||
|
||||
m_tree->SetMenu( LIB_TREE_NODE::LIBID, std::move( menuPart ) );
|
||||
m_tree->SetMenu( LIB_TREE_NODE::LIB, std::move( menuLibrary ) );
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <gerber_file_image_list.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tools/gerbview_actions.h>
|
||||
#include <tools/gerbview_control.h>
|
||||
|
||||
///@{
|
||||
/// \ingroup config
|
||||
@ -309,13 +310,15 @@ void DIALOG_PRINT_GERBVIEW::saveSettings()
|
||||
}
|
||||
|
||||
|
||||
void GERBVIEW_FRAME::ToPrinter( wxCommandEvent& event )
|
||||
int GERBVIEW_CONTROL::Print( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
// Selection affects the original item visibility
|
||||
GetToolManager()->RunAction( GERBVIEW_ACTIONS::selectionClear, true );
|
||||
m_toolMgr->RunAction( GERBVIEW_ACTIONS::selectionClear, true );
|
||||
|
||||
BOARD_PRINTOUT_SETTINGS settings( GetPageSettings() );
|
||||
DIALOG_PRINT_GERBVIEW dlg( this, &settings );
|
||||
BOARD_PRINTOUT_SETTINGS settings( m_frame->GetPageSettings() );
|
||||
DIALOG_PRINT_GERBVIEW dlg( m_frame, &settings );
|
||||
dlg.ForcePrintBorder( false );
|
||||
dlg.ShowModal();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -86,7 +86,6 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, EDA_DRAW_FRAME )
|
||||
// menu Miscellaneous
|
||||
EVT_MENU( ID_GERBVIEW_ERASE_CURR_LAYER, GERBVIEW_FRAME::Process_Special_Functions )
|
||||
|
||||
EVT_TOOL( wxID_PRINT, GERBVIEW_FRAME::ToPrinter )
|
||||
EVT_COMBOBOX( ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER, GERBVIEW_FRAME::OnSelectActiveLayer )
|
||||
|
||||
EVT_SELECT_DCODE( ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE, GERBVIEW_FRAME::OnSelectActiveDCode )
|
||||
@ -95,13 +94,10 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, EDA_DRAW_FRAME )
|
||||
GERBVIEW_FRAME::Process_Special_Functions )
|
||||
|
||||
// Option toolbar
|
||||
EVT_TOOL( ID_TB_MEASUREMENT_TOOL, GERBVIEW_FRAME::Process_Special_Functions )
|
||||
EVT_TOOL( ID_TB_OPTIONS_SHOW_LAYERS_MANAGER_VERTICAL_TOOLBAR,
|
||||
GERBVIEW_FRAME::OnToggleShowLayerManager )
|
||||
EVT_TOOL_RANGE( ID_TB_OPTIONS_SHOW_GBR_MODE_0, ID_TB_OPTIONS_SHOW_GBR_MODE_2,
|
||||
GERBVIEW_FRAME::OnSelectDisplayMode )
|
||||
EVT_TOOL( ID_TB_OPTIONS_DIFF_MODE, GERBVIEW_FRAME::OnSelectOptionToolbar )
|
||||
EVT_TOOL( ID_TB_OPTIONS_HIGH_CONTRAST_MODE, GERBVIEW_FRAME::OnSelectOptionToolbar )
|
||||
|
||||
// Auxiliary horizontal toolbar
|
||||
EVT_CHOICE( ID_GBR_AUX_TOOLBAR_PCB_CMP_CHOICE, GERBVIEW_FRAME::OnSelectHighlightChoice )
|
||||
@ -143,10 +139,6 @@ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||
ClearMsgPanel();
|
||||
break;
|
||||
|
||||
case ID_TB_MEASUREMENT_TOOL:
|
||||
SetToolID( id, wxCURSOR_DEFAULT, _( "Unsupported tool in this canvas" ) );
|
||||
break;
|
||||
|
||||
case ID_GERBVIEW_SHOW_LIST_DCODES:
|
||||
Liste_D_Codes();
|
||||
break;
|
||||
@ -312,36 +304,3 @@ void GERBVIEW_FRAME::OnToggleShowLayerManager( wxCommandEvent& aEvent )
|
||||
m_auimgr.GetPane( "LayersManager" ).Show( m_show_layer_manager_tools );
|
||||
m_auimgr.Update();
|
||||
}
|
||||
|
||||
|
||||
void GERBVIEW_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
|
||||
{
|
||||
int id = event.GetId();
|
||||
bool needs_refresh = false;
|
||||
|
||||
GBR_DISPLAY_OPTIONS options = m_DisplayOptions;
|
||||
|
||||
switch( id )
|
||||
{
|
||||
case ID_TB_OPTIONS_DIFF_MODE:
|
||||
options.m_DiffMode = !options.m_DiffMode;
|
||||
needs_refresh = true;
|
||||
break;
|
||||
|
||||
case ID_TB_OPTIONS_HIGH_CONTRAST_MODE:
|
||||
options.m_HighContrastMode = !options.m_HighContrastMode;
|
||||
needs_refresh = true;
|
||||
break;
|
||||
|
||||
case ID_TB_MEASUREMENT_TOOL:
|
||||
SetToolID( id, wxCURSOR_DEFAULT, _( "Unsupported tool in this canvas" ) );
|
||||
break;
|
||||
|
||||
default:
|
||||
wxMessageBox( wxT( "GERBVIEW_FRAME::OnSelectOptionToolbar error" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
if( needs_refresh )
|
||||
UpdateDisplayOptions( options );
|
||||
}
|
||||
|
@ -97,10 +97,9 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
|
||||
m_zipFileHistory.SetMaxFiles( fileHistorySize );
|
||||
m_jobFileHistory.SetMaxFiles( fileHistorySize );
|
||||
|
||||
EDA_DRAW_PANEL_GAL* galCanvas = new GERBVIEW_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ),
|
||||
m_FrameSize,
|
||||
GetGalDisplayOptions(),
|
||||
EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE );
|
||||
auto* galCanvas = new GERBVIEW_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize,
|
||||
GetGalDisplayOptions(),
|
||||
EDA_DRAW_PANEL_GAL::GAL_TYPE_NONE );
|
||||
|
||||
SetGalCanvas( galCanvas );
|
||||
|
||||
@ -757,20 +756,11 @@ bool GERBVIEW_FRAME::IsElementVisible( int aLayerID ) const
|
||||
{
|
||||
switch( aLayerID )
|
||||
{
|
||||
case LAYER_DCODES:
|
||||
return m_DisplayOptions.m_DisplayDCodes;
|
||||
|
||||
case LAYER_NEGATIVE_OBJECTS:
|
||||
return m_DisplayOptions.m_DisplayNegativeObjects;
|
||||
|
||||
case LAYER_GERBVIEW_GRID:
|
||||
return IsGridVisible();
|
||||
|
||||
case LAYER_WORKSHEET:
|
||||
return m_showBorderAndTitleBlock;
|
||||
|
||||
case LAYER_PCB_BACKGROUND:
|
||||
return true;
|
||||
case LAYER_DCODES: return m_DisplayOptions.m_DisplayDCodes;
|
||||
case LAYER_NEGATIVE_OBJECTS: return m_DisplayOptions.m_DisplayNegativeObjects;
|
||||
case LAYER_GERBVIEW_GRID: return IsGridVisible();
|
||||
case LAYER_WORKSHEET: return m_showBorderAndTitleBlock;
|
||||
case LAYER_PCB_BACKGROUND: return true;
|
||||
|
||||
default:
|
||||
wxLogDebug( wxT( "GERBVIEW_FRAME::IsElementVisible(): bad arg %d" ), aLayerID );
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user