Update frame type enum to match current class names.

This commit is contained in:
Jeff Young 2019-09-05 23:00:47 +01:00
parent c3226653cc
commit 10c25a2290
45 changed files with 134 additions and 142 deletions

View File

@ -192,18 +192,18 @@ void COLORS_DESIGN_SETTINGS::setupConfigParams()
switch( m_frameType )
{
case FRAME_GERBER:
case FRAME_PCB: /* no prefix */ break;
case FRAME_PCB_EDITOR: /* no prefix */ break;
case FRAME_CVPCB_DISPLAY:
case FRAME_PCB_MODULE_VIEWER:
case FRAME_PCB_MODULE_VIEWER_MODAL:
case FRAME_PCB_FOOTPRINT_WIZARD:
case FRAME_PCB_FOOTPRINT_PREVIEW:
case FRAME_PCB_MODULE_EDITOR: SetConfigPrefix( "ModEdit" ); break;
case FRAME_FOOTPRINT_VIEWER:
case FRAME_FOOTPRINT_VIEWER_MODAL:
case FRAME_FOOTPRINT_WIZARD:
case FRAME_FOOTPRINT_PREVIEW:
case FRAME_FOOTPRINT_EDITOR: SetConfigPrefix( "ModEdit" ); break;
case FRAME_PCB_DISPLAY3D: SetConfigPrefix( "fp3d_" ); break;
case FRAME_PCB_DISPLAY3D: SetConfigPrefix( "fp3d_" ); break;
default: break;
default: break;
}
wxString fmt( "Color4DPCBLayer_%s" );
@ -230,7 +230,7 @@ void COLORS_DESIGN_SETTINGS::setupConfigParams()
// Add prms only relevant in board editor
if( m_frameType == FRAME_PCB )
if( m_frameType == FRAME_PCB_EDITOR )
{
Add( "Color4DViaThruEx", ITEM_COLOR( LAYER_VIA_THROUGH ), LIGHTGRAY );
Add( "Color4DViaBBlindEx", ITEM_COLOR( LAYER_VIA_BBLIND ), BROWN );

View File

@ -651,7 +651,7 @@ bool EDA_DRAW_FRAME::saveCanvasTypeSetting( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvas
FRAME_T allowed_frames[] =
{
FRAME_SCH,
FRAME_PCB, FRAME_PCB_MODULE_EDITOR,
FRAME_PCB_EDITOR, FRAME_FOOTPRINT_EDITOR,
FRAME_GERBER
};

View File

@ -279,11 +279,11 @@ KIWAY::FACE_T KIWAY::KifaceType( FRAME_T aFrameType )
case FRAME_SIMULATOR:
return FACE_SCH;
case FRAME_PCB:
case FRAME_PCB_MODULE_EDITOR:
case FRAME_PCB_MODULE_VIEWER:
case FRAME_PCB_MODULE_VIEWER_MODAL:
case FRAME_PCB_FOOTPRINT_WIZARD:
case FRAME_PCB_EDITOR:
case FRAME_FOOTPRINT_EDITOR:
case FRAME_FOOTPRINT_VIEWER:
case FRAME_FOOTPRINT_VIEWER_MODAL:
case FRAME_FOOTPRINT_WIZARD:
case FRAME_PCB_DISPLAY3D:
return FACE_PCB;

View File

@ -317,9 +317,9 @@ bool PGM_SINGLE_TOP::OnPgmInit()
wxString name;
FRAME_T type;
} frameTypes[] = {
{ wxT( "pcb" ), FRAME_PCB },
{ wxT( "fpedit" ), FRAME_PCB_MODULE_EDITOR },
{ wxT( "" ), FRAME_T_COUNT }
{ wxT( "pcb" ), FRAME_PCB_EDITOR },
{ wxT( "fpedit" ), FRAME_FOOTPRINT_EDITOR },
{ wxT( "" ), FRAME_T_COUNT }
};
if( argc > 2 )

View File

@ -514,12 +514,12 @@ TOOL_ACTION ACTIONS::showSymbolEditor( "common.Control.showSymbolEditor",
TOOL_ACTION ACTIONS::showFootprintBrowser( "common.Control.showFootprintBrowser",
AS_GLOBAL, 0, "",
_( "Footprint Library Browser" ), _( "Browse footprint libraries" ),
modview_icon_xpm, AF_NONE, (void*) FRAME_PCB_MODULE_VIEWER );
modview_icon_xpm, AF_NONE, (void*) FRAME_FOOTPRINT_VIEWER );
TOOL_ACTION ACTIONS::showFootprintEditor( "common.Control.showFootprintEditor",
AS_GLOBAL, 0, "",
_( "Footprint Editor" ), _( "Create, delete and edit footprints" ),
module_editor_xpm, AF_NONE, (void*) FRAME_PCB_MODULE_EDITOR );
module_editor_xpm, AF_NONE, (void*) FRAME_FOOTPRINT_EDITOR );
TOOL_ACTION ACTIONS::updatePcbFromSchematic( "common.Control.updatePcbFromSchematic",
AS_GLOBAL,

View File

@ -255,15 +255,15 @@ int COMMON_TOOLS::ZoomFitScreen( const TOOL_EVENT& aEvent )
double margin_scale_factor = 1.1;
// Leave a bigger margin for library editors & viewers
if( frame->IsType( FRAME_SCH_LIB_EDITOR ) || frame->IsType( FRAME_PCB_MODULE_EDITOR ) )
{
margin_scale_factor = 2;
}
else if( frame->IsType( FRAME_PCB_MODULE_VIEWER ) || frame->IsType( FRAME_PCB_MODULE_VIEWER_MODAL )
|| frame->IsType( FRAME_SCH_VIEWER ) || frame->IsType( FRAME_SCH_VIEWER_MODAL ) )
if( frame->IsType( FRAME_FOOTPRINT_VIEWER ) || frame->IsType( FRAME_FOOTPRINT_VIEWER_MODAL )
|| frame->IsType( FRAME_SCH_VIEWER ) || frame->IsType( FRAME_SCH_VIEWER_MODAL ) )
{
margin_scale_factor = 1.4;
}
else if( frame->IsType( FRAME_SCH_LIB_EDITOR ) || frame->IsType( FRAME_FOOTPRINT_EDITOR ) )
{
margin_scale_factor = 2;
}
view->SetScale( scale / margin_scale_factor );
view->SetCenter( bBox.Centre() );

View File

@ -116,7 +116,7 @@ FOOTPRINT_PREVIEW_PANEL_BASE* FOOTPRINT_PREVIEW_PANEL_BASE::Create(
try {
KIFACE* kiface = aKiway.KiFACE( KIWAY::FACE_PCB );
auto window = kiface->CreateWindow( aParent, FRAME_PCB_FOOTPRINT_PREVIEW, &aKiway );
auto window = kiface->CreateWindow( aParent, FRAME_FOOTPRINT_PREVIEW, &aKiway );
panel = dynamic_cast<FOOTPRINT_PREVIEW_PANEL_BASE*>( window );

View File

@ -41,16 +41,15 @@ enum
wxDEFINE_EVENT( EVT_FOOTPRINT_SELECTED, wxCommandEvent );
FOOTPRINT_SELECT_WIDGET::FOOTPRINT_SELECT_WIDGET( wxWindow* aParent,
FOOTPRINT_LIST* aFpList, bool aUpdate,
int aMaxItems )
: wxPanel( aParent ),
m_kiway( nullptr ),
m_update( aUpdate ),
m_finished_loading( false ),
m_max_items( aMaxItems ),
m_last_item( 0 ),
m_fp_list( aFpList )
FOOTPRINT_SELECT_WIDGET::FOOTPRINT_SELECT_WIDGET( wxWindow* aParent, FOOTPRINT_LIST* aFpList,
bool aUpdate, int aMaxItems ) :
wxPanel( aParent ),
m_kiway( nullptr ),
m_update( aUpdate ),
m_finished_loading( false ),
m_max_items( aMaxItems ),
m_last_item( 0 ),
m_fp_list( aFpList )
{
m_zero_filter = true;
m_sizer = new wxBoxSizer( wxVERTICAL );
@ -167,7 +166,7 @@ wxString FOOTPRINT_SELECT_WIDGET::ShowPicker()
// event loop goes all silly.
wxASSERT( !dsparent || dsparent->IsQuasiModal() );
auto frame = m_kiway->Player( FRAME_PCB_MODULE_VIEWER_MODAL, true );
auto frame = m_kiway->Player( FRAME_FOOTPRINT_VIEWER_MODAL, true );
if( !frame->ShowModal( &fpname, parent ) )
{
@ -195,14 +194,10 @@ void FOOTPRINT_SELECT_WIDGET::FilterByPinCount( int aPinCount )
}
void FOOTPRINT_SELECT_WIDGET::FilterByFootprintFilters(
wxArrayString const& aFilters, bool aZeroFilters )
void FOOTPRINT_SELECT_WIDGET::FilterByFootprintFilters( wxArrayString const& aFilters,
bool aZeroFilters )
{
if( aZeroFilters && aFilters.size() == 0 )
m_zero_filter = true;
else
m_zero_filter = false;
m_zero_filter = ( aZeroFilters && aFilters.size() == 0 );
m_fp_filter.FilterByFootprintFilters( aFilters );
}

View File

@ -234,7 +234,7 @@ protected:
if( fpid.IsEmpty() )
fpid = m_preselect;
KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true, m_dlg );
KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_FOOTPRINT_VIEWER_MODAL, true, m_dlg );
if( frame->ShowModal( &fpid, m_dlg ) )
SetValue( fpid );

View File

@ -323,7 +323,7 @@ void SCH_EDIT_FRAME::SendMessageToPCBNEW( EDA_ITEM* aObjectToSync, SCH_COMPONENT
// Typically ExpressMail is going to be s-expression packets, but since
// we have existing interpreter of the cross probe packet on the other
// side in place, we use that here.
Kiway().ExpressMail( FRAME_PCB, MAIL_CROSS_PROBE, packet, this );
Kiway().ExpressMail( FRAME_PCB_EDITOR, MAIL_CROSS_PROBE, packet, this );
}
}
}
@ -344,7 +344,7 @@ void SCH_EDIT_FRAME::SendCrossProbeNetName( const wxString& aNetName )
// Typically ExpressMail is going to be s-expression packets, but since
// we have existing interpreter of the cross probe packet on the other
// side in place, we use that here.
Kiway().ExpressMail( FRAME_PCB, MAIL_CROSS_PROBE, packet, this );
Kiway().ExpressMail( FRAME_PCB_EDITOR, MAIL_CROSS_PROBE, packet, this );
}
}
}
@ -361,7 +361,7 @@ void SCH_EDIT_FRAME::SendCrossProbeClearHighlight()
// Typically ExpressMail is going to be s-expression packets, but since
// we have existing interpreter of the cross probe packet on the other
// side in place, we use that here.
Kiway().ExpressMail( FRAME_PCB, MAIL_CROSS_PROBE, packet, this );
Kiway().ExpressMail( FRAME_PCB_EDITOR, MAIL_CROSS_PROBE, packet, this );
}
}

View File

@ -103,7 +103,7 @@ void DIALOG_EDIT_ONE_FIELD::OnTextValueSelectButtonClick( wxCommandEvent& aEvent
// pick a footprint using the footprint picker.
wxString fpid = m_TextValue->GetValue();
KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true );
KIWAY_PLAYER* frame = Kiway().Player( FRAME_FOOTPRINT_VIEWER_MODAL, true );
if( frame->ShowModal( &fpid, this ) )
{

View File

@ -86,8 +86,7 @@ protected:
{
// pick a footprint using the footprint picker.
wxString fpid = m_grid->GetCellValue( m_grid->GetGridCursorRow(), FOOTPRINT );
KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true,
m_dlg );
KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_FOOTPRINT_VIEWER_MODAL, true, m_dlg );
if( frame->ShowModal( &fpid, m_dlg ) )
m_grid->SetCellValue( m_grid->GetGridCursorRow(), FOOTPRINT, fpid );

View File

@ -525,7 +525,7 @@ void FIELDS_GRID_TRICKS::doPopupSelection( wxCommandEvent& event )
{
// pick a footprint using the footprint picker.
wxString fpid = m_grid->GetCellValue( FOOTPRINT, FDC_VALUE );
KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true, m_dlg );
KIWAY_PLAYER* frame = m_dlg->Kiway().Player( FRAME_FOOTPRINT_VIEWER_MODAL, true, m_dlg );
if( frame->ShowModal( &fpid, m_dlg ) )
m_grid->SetCellValue( FOOTPRINT, FDC_VALUE, fpid );

View File

@ -643,7 +643,7 @@ void SCH_EDIT_FRAME::OnUpdatePCB( wxCommandEvent& event )
return;
}
KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB, true );
KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB_EDITOR, true );
// a pcb frame can be already existing, but not yet used.
// this is the case when running the footprint editor, or the footprint viewer first
@ -661,7 +661,7 @@ void SCH_EDIT_FRAME::OnUpdatePCB( wxCommandEvent& event )
frame->Raise();
std::string payload;
Kiway().ExpressMail( FRAME_PCB, MAIL_PCB_UPDATE, payload, this );
Kiway().ExpressMail( FRAME_PCB_EDITOR, MAIL_PCB_UPDATE, payload, this );
}
@ -805,7 +805,7 @@ void SCH_EDIT_FRAME::OnOpenPcbnew( wxCommandEvent& event )
}
else
{
KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB, true );
KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB_EDITOR, true );
// a pcb frame can be already existing, but not yet used.
// this is the case when running the footprint editor, or the footprint viewer first

View File

@ -39,13 +39,13 @@ enum FRAME_T
FRAME_SCH_VIEWER_MODAL,
FRAME_SIMULATOR,
FRAME_PCB,
FRAME_PCB_MODULE_EDITOR,
FRAME_PCB_MODULE_VIEWER,
FRAME_PCB_MODULE_VIEWER_MODAL,
FRAME_PCB_FOOTPRINT_WIZARD,
FRAME_PCB_EDITOR,
FRAME_FOOTPRINT_EDITOR,
FRAME_FOOTPRINT_VIEWER,
FRAME_FOOTPRINT_VIEWER_MODAL,
FRAME_FOOTPRINT_WIZARD,
FRAME_PCB_DISPLAY3D,
FRAME_PCB_FOOTPRINT_PREVIEW,
FRAME_FOOTPRINT_PREVIEW,
FRAME_CVPCB,
FRAME_CVPCB_DISPLAY,

View File

@ -160,13 +160,13 @@ void KICAD_MANAGER_FRAME::OnImportEagleFiles( wxCommandEvent& event )
if( pcb.FileExists() )
{
KIWAY_PLAYER* pcbframe = Kiway().Player( FRAME_PCB, false );
KIWAY_PLAYER* pcbframe = Kiway().Player( FRAME_PCB_EDITOR, false );
if( !pcbframe )
{
try // PCB frame was not available, try to start it
{
pcbframe = Kiway().Player( FRAME_PCB, true );
pcbframe = Kiway().Player( FRAME_PCB_EDITOR, true );
}
catch( const IO_ERROR& err )
{
@ -186,7 +186,7 @@ void KICAD_MANAGER_FRAME::OnImportEagleFiles( wxCommandEvent& event )
std::string packet = StrPrintf( "%d\n%s", IO_MGR::EAGLE,
TO_UTF8( pcb.GetFullPath() ) );
pcbframe->Kiway().ExpressMail( FRAME_PCB, MAIL_IMPORT_FILE, packet, this );
pcbframe->Kiway().ExpressMail( FRAME_PCB_EDITOR, MAIL_IMPORT_FILE, packet, this );
// On Windows, Raise() does not bring the window on screen, when iconized
if( pcbframe->IsIconized() )

View File

@ -69,13 +69,13 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::editPCB( "kicad.Control.editPCB",
AS_GLOBAL,
MD_CTRL + 'P', LEGACY_HK_NAME( "Run Pcbnew" ),
_( "Edit PCB" ), _( "Edit PCB" ),
pcbnew_xpm, AF_NONE, (void*) FRAME_PCB );
pcbnew_xpm, AF_NONE, (void*) FRAME_PCB_EDITOR );
TOOL_ACTION KICAD_MANAGER_ACTIONS::editFootprints( "kicad.Control.editFootprints",
AS_GLOBAL,
MD_CTRL + 'F', LEGACY_HK_NAME( "Run FpEditor" ),
_( "Edit PCB Footprints" ), _( "Edit PCB Footprints" ),
module_editor_xpm, AF_NONE, (void*) FRAME_PCB_MODULE_EDITOR );
module_editor_xpm, AF_NONE, (void*) FRAME_FOOTPRINT_EDITOR );
TOOL_ACTION KICAD_MANAGER_ACTIONS::viewGerbers( "kicad.Control.viewGerbers",
AS_GLOBAL,

View File

@ -360,7 +360,7 @@ int KICAD_MANAGER_CONTROL::ShowPlayer( const TOOL_EVENT& aEvent )
{
filepath = m_frame->SchFileName();
}
else if( playerType == FRAME_PCB )
else if( playerType == FRAME_PCB_EDITOR )
{
wxFileName kicad_board( m_frame->PcbFileName() );
wxFileName legacy_board( m_frame->PcbLegacyFileName() );

View File

@ -237,7 +237,7 @@ void TREEPROJECT_ITEM::Activate( TREE_PROJECT_FRAME* aTreePrjFrame )
case TREE_FOOTPRINT_FILE:
toolMgr->RunAction( KICAD_MANAGER_ACTIONS::editFootprints, true );
packet = fullFileName.ToStdString();
kiway.ExpressMail( FRAME_PCB_MODULE_EDITOR, MAIL_FP_EDIT, packet );
kiway.ExpressMail( FRAME_FOOTPRINT_EDITOR, MAIL_FP_EDIT, packet );
break;
case TREE_SCHEMATIC_LIBFILE:

View File

@ -576,7 +576,7 @@ add_executable( pcbnew WIN32 MACOSX_BUNDLE
${PCBNEW_RESOURCES}
)
set_source_files_properties( ../common/single_top.cpp pcbnew.cpp PROPERTIES
COMPILE_DEFINITIONS "TOP_FRAME=FRAME_PCB;PGM_DATA_FILE_EXT=\"kicad_pcb\";BUILD_KIWAY_DLL"
COMPILE_DEFINITIONS "TOP_FRAME=FRAME_PCB_EDITOR;PGM_DATA_FILE_EXT=\"kicad_pcb\";BUILD_KIWAY_DLL"
)
target_link_libraries( pcbnew
#singletop # replaces common, giving us restrictive control and link warnings.

View File

@ -48,7 +48,7 @@ BOARD_COMMIT::BOARD_COMMIT( PCB_TOOL_BASE* aTool )
BOARD_COMMIT::BOARD_COMMIT( EDA_DRAW_FRAME* aFrame )
{
m_toolMgr = aFrame->GetToolManager();
m_editModules = aFrame->IsType( FRAME_PCB_MODULE_EDITOR );
m_editModules = aFrame->IsType( FRAME_FOOTPRINT_EDITOR );
}

View File

@ -96,7 +96,7 @@ wxPoint BOARD_ITEM::ZeroOffset( 0, 0 );
// These settings will be overriden later, depending on the draw frame that displays the board.
// However, when a board is created by a python script, outside a frame, the colors must be set
// so dummyColorsSettings provide this default initialization
static PCB_GENERAL_SETTINGS dummyGeneralSettings( FRAME_PCB );
static PCB_GENERAL_SETTINGS dummyGeneralSettings( FRAME_PCB_EDITOR );
BOARD::BOARD() :
BOARD_ITEM_CONTAINER( (BOARD_ITEM*) NULL, PCB_T ),

View File

@ -478,7 +478,7 @@ void DIALOG_EXCHANGE_FOOTPRINTS::ViewAndSelectFootprint( wxCommandEvent& event )
{
wxString newname = m_newID->GetValue();
KIWAY_PLAYER* frame = Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true );
KIWAY_PLAYER* frame = Kiway().Player( FRAME_FOOTPRINT_VIEWER_MODAL, true );
if( frame->ShowModal( &newname, this ) )
{

View File

@ -58,7 +58,7 @@ DIALOG_MOVE_EXACT::DIALOG_MOVE_EXACT( PCB_BASE_FRAME *aParent, wxPoint& aTransla
m_menuIDs.push_back( aAnchor );
m_menuIDs.push_back( ROTATE_AROUND_USER_ORIGIN );
if( aParent->IsType( FRAME_PCB ) )
if( aParent->IsType( FRAME_PCB_EDITOR ) )
m_menuIDs.push_back( ROTATE_AROUND_AUX_ORIGIN );
buildRotationAnchorMenu();

View File

@ -564,7 +564,7 @@ void DIALOG_PAD_PROPERTIES::initValues()
// Disable pad net name wxTextCtrl if the caller is the footprint editor
// because nets are living only in the board managed by the board editor
m_canEditNetName = m_parent->IsType( FRAME_PCB );
m_canEditNetName = m_parent->IsType( FRAME_PCB_EDITOR );
// Setup layers names from board
// Should be made first, before calling m_rbCopperLayersSel->SetSelection()

View File

@ -47,7 +47,7 @@ DIALOG_PUSH_PAD_PROPERTIES::DIALOG_PUSH_PAD_PROPERTIES( PCB_BASE_FRAME* aParent
// that requires us to correct the button labels here.
m_sdbSizer1OK->SetLabel( _( "Change Pads on Current Footprint" ) );
if( aParent->IsType( FRAME_PCB_MODULE_EDITOR ) )
if( aParent->IsType( FRAME_FOOTPRINT_EDITOR ) )
m_sdbSizer1Apply->Show( false );
else
m_sdbSizer1Apply->SetLabel( _( "Change Pads on Identical Footprints" ) );

View File

@ -853,12 +853,12 @@ void InvokePcbLibTableEditor( KIWAY* aKiway, wxWindow* aCaller )
}
}
auto editor = (FOOTPRINT_EDIT_FRAME*) aKiway->Player( FRAME_PCB_MODULE_EDITOR, false );
auto editor = (FOOTPRINT_EDIT_FRAME*) aKiway->Player( FRAME_FOOTPRINT_EDITOR, false );
if( editor )
editor->SyncLibraryTree( true );
auto viewer = (FOOTPRINT_VIEWER_FRAME*) aKiway->Player( FRAME_PCB_MODULE_VIEWER, false );
auto viewer = (FOOTPRINT_VIEWER_FRAME*) aKiway->Player( FRAME_FOOTPRINT_VIEWER, false );
if( viewer )
viewer->ReCreateLibraryList();

View File

@ -101,7 +101,7 @@ static const wxChar defaultLibWidthEntry[] = wxT( "ModeditLibWidth" );
FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent,
EDA_DRAW_PANEL_GAL::GAL_TYPE aBackend ) :
PCB_BASE_EDIT_FRAME( aKiway, aParent, FRAME_PCB_MODULE_EDITOR, wxEmptyString,
PCB_BASE_EDIT_FRAME( aKiway, aParent, FRAME_FOOTPRINT_EDITOR, wxEmptyString,
wxDefaultPosition, wxDefaultSize,
KICAD_DEFAULT_DRAWFRAME_STYLE, GetFootprintEditorFrameName() )
{
@ -377,7 +377,7 @@ void FOOTPRINT_EDIT_FRAME::SetDesignSettings( const BOARD_DESIGN_SETTINGS& aSett
const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const
{
// get the settings from the parent editor, not our BOARD.
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true );
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB_EDITOR, true );
wxASSERT( parentFrame );
return parentFrame->GetPlotSettings();
@ -387,7 +387,7 @@ const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const
void FOOTPRINT_EDIT_FRAME::SetPlotSettings( const PCB_PLOT_PARAMS& aSettings )
{
// set the settings into parent editor, not our BOARD.
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB, true );
PCB_BASE_FRAME* parentFrame = (PCB_BASE_FRAME*) Kiway().Player( FRAME_PCB_EDITOR, true );
wxASSERT( parentFrame );
parentFrame->SetPlotSettings( aSettings );
@ -488,7 +488,7 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateModuleSelected( wxUpdateUIEvent& aEvent )
void FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard( wxUpdateUIEvent& aEvent )
{
PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, false );
PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB_EDITOR, false );
aEvent.Enable( frame && frame->GetBoard()->GetFirstModule() != NULL );
}
@ -496,7 +496,7 @@ void FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard( wxUpdateUIEvent& aEvent
void FOOTPRINT_EDIT_FRAME::OnUpdateInsertModuleInBoard( wxUpdateUIEvent& aEvent )
{
PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, false );
PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB_EDITOR, false );
MODULE* module_in_edit = GetBoard()->GetFirstModule();
bool canInsert = frame && module_in_edit && !module_in_edit->GetLink();

View File

@ -198,16 +198,16 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
{
if( !HandleUnsavedChanges( this, _( "The current footprint has been modified. "
"Save changes?" ),
[&]() -> bool {
return SaveFootprint( GetBoard()->GetFirstModule() );
} ) )
[&]() -> bool {
return SaveFootprint( GetBoard()->GetFirstModule() );
} ) )
{
break;
}
}
FOOTPRINT_WIZARD_FRAME* wizard = (FOOTPRINT_WIZARD_FRAME*) Kiway().Player(
FRAME_PCB_FOOTPRINT_WIZARD, true, this );
auto wizard = (FOOTPRINT_WIZARD_FRAME*) Kiway().Player( FRAME_FOOTPRINT_WIZARD, true,
this );
if( wizard->ShowModal( NULL, this ) )
{

View File

@ -568,7 +568,7 @@ bool PCB_BASE_EDIT_FRAME::AddLibrary( const wxString& aFilename )
return false;
}
auto editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_PCB_MODULE_EDITOR, false );
auto editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_FOOTPRINT_EDITOR, false );
if( editor )
{
@ -577,7 +577,7 @@ bool PCB_BASE_EDIT_FRAME::AddLibrary( const wxString& aFilename )
editor->FocusOnLibID( libID );
}
auto viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, false );
auto viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_FOOTPRINT_VIEWER, false );
if( viewer )
viewer->ReCreateLibraryList();
@ -791,7 +791,7 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard( bool aAddNew )
{
// update module in the current board,
// not just add it to the board with total disregard for the netlist...
PCB_EDIT_FRAME* pcbframe = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, false );
PCB_EDIT_FRAME* pcbframe = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB_EDITOR, false );
if( pcbframe == NULL ) // happens when the board editor is not active (or closed)
{

View File

@ -261,7 +261,7 @@ FOOTPRINT_PREVIEW_PANEL::FOOTPRINT_PREVIEW_PANEL( KIWAY* aKiway, wxWindow* aPare
EnableScrolling( false, false ); // otherwise Zoom Auto disables GAL canvas
m_dummyBoard = std::make_unique<BOARD>();
m_colorsSettings = std::make_unique<COLORS_DESIGN_SETTINGS>( FRAME_PCB_FOOTPRINT_PREVIEW );
m_colorsSettings = std::make_unique<COLORS_DESIGN_SETTINGS>( FRAME_FOOTPRINT_PREVIEW );
m_colorsSettings->Load( Kiface().KifaceSettings() );
UseColorScheme( m_colorsSettings.get() );
@ -368,7 +368,7 @@ wxWindow* FOOTPRINT_PREVIEW_PANEL::GetWindow()
FOOTPRINT_PREVIEW_PANEL* FOOTPRINT_PREVIEW_PANEL::New( KIWAY* aKiway, wxWindow* aParent )
{
PCB_EDIT_FRAME* pcbnew = static_cast<PCB_EDIT_FRAME*>( aKiway->Player( FRAME_PCB, false ) );
PCB_EDIT_FRAME* pcbnew = static_cast<PCB_EDIT_FRAME*>( aKiway->Player( FRAME_PCB_EDITOR, false ) );
wxConfigBase* cfg = Kiface().KifaceSettings();
wxConfigBase* commonCfg = Pgm().CommonSettings();
bool btemp;

View File

@ -112,15 +112,14 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
FRAME_T aFrameType ) :
PCB_BASE_FRAME( aKiway, aParent, aFrameType, _( "Footprint Library Browser" ),
wxDefaultPosition, wxDefaultSize,
aFrameType == FRAME_PCB_MODULE_VIEWER_MODAL ? ( aParent ? PARENT_STYLE : MODAL_STYLE )
: NONMODAL_STYLE,
aFrameType == FRAME_PCB_MODULE_VIEWER_MODAL ? FOOTPRINT_VIEWER_FRAME_NAME_MODAL
: FOOTPRINT_VIEWER_FRAME_NAME )
aFrameType == FRAME_FOOTPRINT_VIEWER_MODAL ? ( aParent ? PARENT_STYLE : MODAL_STYLE )
: NONMODAL_STYLE,
aFrameType == FRAME_FOOTPRINT_VIEWER_MODAL ? FOOTPRINT_VIEWER_FRAME_NAME_MODAL
: FOOTPRINT_VIEWER_FRAME_NAME )
{
wxASSERT( aFrameType == FRAME_PCB_MODULE_VIEWER_MODAL ||
aFrameType == FRAME_PCB_MODULE_VIEWER );
wxASSERT( aFrameType == FRAME_FOOTPRINT_VIEWER_MODAL || aFrameType == FRAME_FOOTPRINT_VIEWER );
if( aFrameType == FRAME_PCB_MODULE_VIEWER_MODAL )
if( aFrameType == FRAME_FOOTPRINT_VIEWER_MODAL )
SetModal( true );
// Force the frame name used in config. the footprint viewer frame has a name
@ -651,7 +650,7 @@ void FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB( wxCommandEvent& aEvent )
}
else if( GetBoard()->GetFirstModule() )
{
PCB_EDIT_FRAME* pcbframe = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, false );
PCB_EDIT_FRAME* pcbframe = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB_EDITOR, false );
if( pcbframe == NULL ) // happens when the board editor is not active (or closed)
{

View File

@ -85,7 +85,7 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( KIWAY* aKiway, wxWindow* aParent
FOOTPRINT_WIZARD_FRAME_NAME ),
m_wizardListShown( false )
{
wxASSERT( aFrameType == FRAME_PCB_FOOTPRINT_WIZARD );
wxASSERT( aFrameType == FRAME_FOOTPRINT_WIZARD );
// This frame is always show modal:
SetModal( true );
@ -626,8 +626,7 @@ void FOOTPRINT_WIZARD_FRAME::PythonPluginsReload()
// Because the board editor has also a plugin python menu,
// call PCB_EDIT_FRAME::PythonPluginsReload() if the board editor
// is running
PCB_EDIT_FRAME* brd_frame =
static_cast<PCB_EDIT_FRAME*>( Kiway().Player( FRAME_PCB, false ) );
auto brd_frame = static_cast<PCB_EDIT_FRAME*>( Kiway().Player( FRAME_PCB_EDITOR, false ) );
if( brd_frame )
brd_frame->PythonPluginsReload();

View File

@ -92,7 +92,7 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule )
bool is_last_fp_from_brd = IsCurrentFPFromBoard();
MODULE* newModule;
PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB, false );
PCB_EDIT_FRAME* frame = (PCB_EDIT_FRAME*) Kiway().Player( FRAME_PCB_EDITOR, false );
if( frame == NULL ) // happens if no board editor opened
return false;
@ -167,7 +167,7 @@ wxString PCB_BASE_FRAME::SelectFootprintFromLibBrowser()
{
// Close the current non-modal Lib browser if opened, and open a new one, in "modal" mode:
FOOTPRINT_VIEWER_FRAME* viewer;
viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER, false );
viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_FOOTPRINT_VIEWER, false );
if( viewer )
{
@ -183,7 +183,7 @@ wxString PCB_BASE_FRAME::SelectFootprintFromLibBrowser()
SetFocus();
// Creates the modal Lib browser:
viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_PCB_MODULE_VIEWER_MODAL, true, this );
viewer = (FOOTPRINT_VIEWER_FRAME*) Kiway().Player( FRAME_FOOTPRINT_VIEWER_MODAL, true, this );
wxString fpid;
int ret = viewer->ShowModal( &fpid, this );

View File

@ -174,8 +174,8 @@ END_EVENT_TABLE()
PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
PCB_BASE_EDIT_FRAME( aKiway, aParent, FRAME_PCB, wxT( "Pcbnew" ), wxDefaultPosition,
wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, PCB_EDIT_FRAME_NAME )
PCB_BASE_EDIT_FRAME( aKiway, aParent, FRAME_PCB_EDITOR, wxT( "Pcbnew" ), wxDefaultPosition,
wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, PCB_EDIT_FRAME_NAME )
{
m_showBorderAndTitleBlock = true; // true to display sheet references
m_SelTrackWidthBox = NULL;
@ -1095,7 +1095,7 @@ void PCB_EDIT_FRAME::InstallFootprintPropertiesDialog( MODULE* Module )
}
else if( retvalue == DIALOG_FOOTPRINT_BOARD_EDITOR::PRM_EDITOR_EDIT_BOARD_FOOTPRINT )
{
FOOTPRINT_EDIT_FRAME* editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_PCB_MODULE_EDITOR, true );
auto editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_FOOTPRINT_EDITOR, true );
editor->Load_Module_From_BOARD( Module );
@ -1105,7 +1105,7 @@ void PCB_EDIT_FRAME::InstallFootprintPropertiesDialog( MODULE* Module )
else if( retvalue == DIALOG_FOOTPRINT_BOARD_EDITOR::PRM_EDITOR_EDIT_LIBRARY_FOOTPRINT )
{
FOOTPRINT_EDIT_FRAME* editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_PCB_MODULE_EDITOR, true );
auto editor = (FOOTPRINT_EDIT_FRAME*) Kiway().Player( FRAME_FOOTPRINT_EDITOR, true );
editor->LoadModuleFromLibrary( Module->GetFPID() );

View File

@ -37,7 +37,7 @@ PCB_GENERAL_SETTINGS::PCB_GENERAL_SETTINGS( FRAME_T aFrameType ) :
{
switch( m_frameType )
{
case FRAME_PCB:
case FRAME_PCB_EDITOR:
Add( "Use45DegreeGraphicSegments", &m_Use45DegreeGraphicSegments, false);
Add( "MagneticPads", reinterpret_cast<int*>( &m_MagneticPads ), CAPTURE_CURSOR_IN_TRACK_TOOL );
Add( "MagneticTracks", reinterpret_cast<int*>( &m_MagneticTracks ), CAPTURE_CURSOR_IN_TRACK_TOOL );
@ -46,7 +46,7 @@ PCB_GENERAL_SETTINGS::PCB_GENERAL_SETTINGS( FRAME_T aFrameType ) :
Add( "FlipLeftRight", &m_FlipLeftRight, false );
break;
case FRAME_PCB_MODULE_EDITOR:
case FRAME_FOOTPRINT_EDITOR:
m_params.push_back( new PARAM_CFG_BOOL( "FpEditorUse45DegreeGraphicSegments",
&m_Use45DegreeGraphicSegments, false,
nullptr, "Use45DegreeGraphicSegments" ) ); // legacy location

View File

@ -686,7 +686,7 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
BOARD* brd = myframe->GetBoard();
wxASSERT( aId > GAL_LAYER_ID_START && aId < GAL_LAYER_ID_END );
if( myframe->IsType( FRAME_PCB ) )
if( myframe->IsType( FRAME_PCB_EDITOR ) )
{
// The layer visibility status is saved in the board file so set the board
// modified state so the user has the option to save the changes.
@ -707,7 +707,7 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled )
myframe->GetCanvas()->GetView()->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
myframe->GetCanvas()->GetView()->SetLayerVisible( aId, true );
if( myframe->IsType( FRAME_PCB ) )
if( myframe->IsType( FRAME_PCB_EDITOR ) )
{
auto opt = static_cast<PCB_DISPLAY_OPTIONS*>( myframe->GetDisplayOptions() );
opt->m_ShowGlobalRatsnest = isEnabled;

View File

@ -69,7 +69,7 @@ PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS()
m_sketchMode[i] = false;
}
COLORS_DESIGN_SETTINGS dummyCds( FRAME_PCB );
COLORS_DESIGN_SETTINGS dummyCds( FRAME_PCB_EDITOR );
ImportLegacyColors( &dummyCds );
update();

View File

@ -80,7 +80,7 @@ static struct IFACE : public KIFACE_I
{
switch( aClassId )
{
case FRAME_PCB:
case FRAME_PCB_EDITOR:
{
auto frame = new PCB_EDIT_FRAME( aKiway, aParent );
@ -98,18 +98,18 @@ static struct IFACE : public KIFACE_I
return frame;
}
case FRAME_PCB_MODULE_EDITOR:
case FRAME_FOOTPRINT_EDITOR:
return new FOOTPRINT_EDIT_FRAME( aKiway, aParent,
EDA_DRAW_PANEL_GAL::GAL_TYPE_UNKNOWN );
case FRAME_PCB_MODULE_VIEWER:
case FRAME_PCB_MODULE_VIEWER_MODAL:
case FRAME_FOOTPRINT_VIEWER:
case FRAME_FOOTPRINT_VIEWER_MODAL:
return new FOOTPRINT_VIEWER_FRAME( aKiway, aParent, FRAME_T( aClassId ) );
case FRAME_PCB_FOOTPRINT_WIZARD:
case FRAME_FOOTPRINT_WIZARD:
return new FOOTPRINT_WIZARD_FRAME( aKiway, aParent, FRAME_T( aClassId ) );
case FRAME_PCB_FOOTPRINT_PREVIEW:
case FRAME_FOOTPRINT_PREVIEW:
return dynamic_cast< wxWindow* >( FOOTPRINT_PREVIEW_PANEL::New( aKiway, aParent ) );
case DIALOG_CONFIGUREPATHS:

View File

@ -1267,7 +1267,7 @@ int EDIT_TOOL::EditFpInFpEditor( const TOOL_EVENT& aEvent )
editFrame->OnModify();
}
auto editor = (FOOTPRINT_EDIT_FRAME*) editFrame->Kiway().Player( FRAME_PCB_MODULE_EDITOR, true );
auto editor = (FOOTPRINT_EDIT_FRAME*) editFrame->Kiway().Player( FRAME_FOOTPRINT_EDITOR, true );
editor->Load_Module_From_BOARD( mod );

View File

@ -93,7 +93,7 @@ void PCBNEW_CONTROL::Reset( RESET_REASON aReason )
int PCBNEW_CONTROL::AddLibrary( const TOOL_EVENT& aEvent )
{
if( m_frame->IsType( FRAME_PCB_MODULE_EDITOR ) || m_frame->IsType( FRAME_PCB ) )
if( m_frame->IsType( FRAME_FOOTPRINT_EDITOR ) || m_frame->IsType( FRAME_PCB_EDITOR ) )
{
if( aEvent.IsAction( &ACTIONS::newLibrary ) )
static_cast<PCB_BASE_EDIT_FRAME*>( m_frame )->CreateNewLibrary();
@ -586,7 +586,7 @@ int PCBNEW_CONTROL::Paste( const TOOL_EVENT& aEvent )
if( clipItem->Type() == PCB_T )
static_cast<BOARD*>( clipItem )->ClearAllNetCodes();
bool editModules = m_editModules || frame()->IsType( FRAME_PCB_MODULE_EDITOR );
bool editModules = m_editModules || frame()->IsType( FRAME_FOOTPRINT_EDITOR );
// The clipboard can contain two different things, an entire kicad_pcb
// or a single module
@ -899,9 +899,9 @@ int PCBNEW_CONTROL::Show3DViewer( const TOOL_EVENT& aEvent )
// Suppress warnings on non-Mac systems
[&draw3DFrame] {}();
if( m_frame->IsType( FRAME_PCB_MODULE_VIEWER )
|| m_frame->IsType( FRAME_PCB_MODULE_VIEWER_MODAL )
|| m_frame->IsType( FRAME_PCB_FOOTPRINT_WIZARD ) )
if( m_frame->IsType( FRAME_FOOTPRINT_VIEWER )
|| m_frame->IsType( FRAME_FOOTPRINT_VIEWER_MODAL )
|| m_frame->IsType( FRAME_FOOTPRINT_WIZARD ) )
{
m_frame->Update3DView( true );

View File

@ -187,7 +187,7 @@ int ALIGN_DISTRIBUTE_TOOL::AlignTop( const TOOL_EVENT& aEvent )
BOARD_ITEM* item = i.first;
// Don't move a pad by itself unless editing the footprint
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB ) )
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB_EDITOR ) )
item = item->GetParent();
item->Move( wxPoint( 0, difference ) );
@ -220,7 +220,7 @@ int ALIGN_DISTRIBUTE_TOOL::AlignBottom( const TOOL_EVENT& aEvent )
BOARD_ITEM* item = i.first;
// Don't move a pad by itself unless editing the footprint
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB ) )
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB_EDITOR ) )
item = item->GetParent();
item->Move( wxPoint( 0, difference ) );
@ -268,7 +268,7 @@ int ALIGN_DISTRIBUTE_TOOL::doAlignLeft()
BOARD_ITEM* item = i.first;
// Don't move a pad by itself unless editing the footprint
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB ) )
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB_EDITOR ) )
item = item->GetParent();
item->Move( wxPoint( difference, 0 ) );
@ -316,7 +316,7 @@ int ALIGN_DISTRIBUTE_TOOL::doAlignRight()
BOARD_ITEM* item = i.first;
// Don't move a pad by itself unless editing the footprint
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB ) )
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB_EDITOR ) )
item = item->GetParent();
item->Move( wxPoint( difference, 0 ) );
@ -349,7 +349,7 @@ int ALIGN_DISTRIBUTE_TOOL::AlignCenterX( const TOOL_EVENT& aEvent )
BOARD_ITEM* item = i.first;
// Don't move a pad by itself unless editing the footprint
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB ) )
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB_EDITOR ) )
item = item->GetParent();
item->Move( wxPoint( difference, 0 ) );
@ -382,7 +382,7 @@ int ALIGN_DISTRIBUTE_TOOL::AlignCenterY( const TOOL_EVENT& aEvent )
BOARD_ITEM* item = i.first;
// Don't move a pad by itself unless editing the footprint
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB ) )
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB_EDITOR ) )
item = item->GetParent();
item->Move( wxPoint( 0, difference ) );
@ -461,7 +461,7 @@ void ALIGN_DISTRIBUTE_TOOL::doDistributeGapsHorizontally( ALIGNMENT_RECTS& items
continue;
// Don't move a pad by itself unless editing the footprint
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB ) )
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB_EDITOR ) )
item = item->GetParent();
int difference = targetX - i.second.GetX();
@ -486,7 +486,7 @@ void ALIGN_DISTRIBUTE_TOOL::doDistributeCentersHorizontally( ALIGNMENT_RECTS &it
BOARD_ITEM* item = i.first;
// Don't move a pad by itself unless editing the footprint
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB ) )
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB_EDITOR ) )
item = item->GetParent();
int difference = targetX - i.second.GetCenter().x;
@ -563,7 +563,7 @@ void ALIGN_DISTRIBUTE_TOOL::doDistributeGapsVertically( ALIGNMENT_RECTS& itemsTo
continue;
// Don't move a pad by itself unless editing the footprint
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB ) )
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB_EDITOR ) )
item = item->GetParent();
int difference = targetY - i.second.GetY();
@ -588,7 +588,7 @@ void ALIGN_DISTRIBUTE_TOOL::doDistributeCentersVertically( ALIGNMENT_RECTS& item
BOARD_ITEM* item = i.first;
// Don't move a pad by itself unless editing the footprint
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB ) )
if( item->Type() == PCB_PAD_T && m_frame->IsType( FRAME_PCB_EDITOR ) )
item = item->GetParent();
int difference = targetY - i.second.GetCenter().y;

View File

@ -101,7 +101,7 @@ int POSITION_RELATIVE_TOOL::RelativeItemSelectionMove( wxPoint aPosAnchor, wxPoi
for( auto item : m_selection )
{
// Don't move a pad by itself unless editing the footprint
if( item->Type() == PCB_PAD_T && frame()->IsType( FRAME_PCB ) )
if( item->Type() == PCB_PAD_T && frame()->IsType( FRAME_PCB_EDITOR ) )
item = item->GetParent();
m_commit->Modify( item );

View File

@ -133,8 +133,8 @@ bool SELECTION_TOOL::Init()
{
auto frame = getEditFrame<PCB_BASE_FRAME>();
if( frame && ( frame->IsType( FRAME_PCB_MODULE_VIEWER )
|| frame->IsType( FRAME_PCB_MODULE_VIEWER_MODAL ) ) )
if( frame && ( frame->IsType( FRAME_FOOTPRINT_VIEWER )
|| frame->IsType( FRAME_FOOTPRINT_VIEWER_MODAL ) ) )
{
frame->AddStandardSubMenus( m_menu );
return true;

View File

@ -565,7 +565,7 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool
// Rebuild pointers and connectivity that can be changed.
// connectivity can be rebuilt only in the board editor frame
if( IsType( FRAME_PCB ) && ( reBuild_ratsnest || deep_reBuild_ratsnest ) )
if( IsType( FRAME_PCB_EDITOR ) && ( reBuild_ratsnest || deep_reBuild_ratsnest ) )
{
Compile_Ratsnest( false );
}