7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 10:01:40 +00:00

EE -> SCH (no functional changes)

This commit is contained in:
Jeff Young 2025-03-12 14:41:25 +00:00
parent d5f02ba7bc
commit 5996cffabc
95 changed files with 1942 additions and 1981 deletions
eeschema
CMakeLists.txtannotate.cppautoplace_fields.cppbus-wire-junction.cppcross-probing.cppdesign_block_utils.cpp
dialogs
eeschema_config.cppfiles-io.cppmenubar.cppnet_navigator.cpppicksymbol.cpp
printing
sch_base_frame.cppsch_collectors.cppsch_collectors.hsch_commit.cppsch_commit.hsch_edit_frame.cpp
sch_io/kicad_sexpr
sch_symbol.cppsch_symbol.hschematic.cppschematic_undo_redo.cpp
sim
symbol_editor
symbol_viewer_frame.cpptoolbars_sch_editor.cpptoolbars_symbol_viewer.cpp
tools
widgets

View File

@ -359,7 +359,6 @@ set( EESCHEMA_SRCS
cross-probing.cpp
design_block_tree_model_adapter.cpp
design_block_utils.cpp
ee_collectors.cpp
eeschema_config.cpp
eeschema_helpers.cpp
eeschema_jobs_handler.cpp
@ -383,6 +382,7 @@ set( EESCHEMA_SRCS
sch_base_frame.cpp
sch_bitmap.cpp
sch_bus_entry.cpp
sch_collectors.cpp
sch_commit.cpp
sch_connection.cpp
sch_draw_panel.cpp
@ -446,14 +446,9 @@ set( EESCHEMA_SRCS
tools/assign_footprints.cpp
tools/backannotate.cpp
tools/ee_actions.cpp
tools/ee_grid_helper.cpp
tools/ee_inspection_tool.cpp
tools/ee_point_editor.cpp
tools/ee_selection.cpp
tools/ee_selection_tool.cpp
tools/ee_tool_utils.cpp
tools/rule_area_create_helper.cpp
tools/sch_actions.cpp
tools/sch_drawing_tools.cpp
tools/sch_design_block_control.cpp
tools/sch_edit_table_tool.cpp
@ -461,9 +456,14 @@ set( EESCHEMA_SRCS
tools/sch_editor_control.cpp
tools/sch_editor_conditions.cpp
tools/sch_find_replace_tool.cpp
tools/sch_inspection_tool.cpp
tools/sch_line_wire_bus_tool.cpp
tools/sch_move_tool.cpp
tools/sch_navigate_tool.cpp
tools/sch_point_editor.cpp
tools/sch_selection.cpp
tools/sch_selection_tool.cpp
tools/sch_tool_utils.cpp
tools/symbol_editor_control.cpp
tools/symbol_editor_drawing_tools.cpp
tools/symbol_editor_edit_tool.cpp

View File

@ -31,8 +31,8 @@
#include <erc/erc_settings.h>
#include <sch_reference_list.h>
#include <symbol_library.h>
#include <tools/ee_selection.h>
#include <tools/ee_selection_tool.h>
#include <tools/sch_selection.h>
#include <tools/sch_selection_tool.h>
#include <tool/tool_manager.h>
#include <dialog_erc.h>
@ -138,9 +138,9 @@ void SCH_EDIT_FRAME::DeleteAnnotation( ANNOTATE_SCOPE_T aAnnotateScope, bool aRe
case ANNOTATE_SELECTION:
{
EE_SELECTION_TOOL* selTool = m_toolManager->GetTool<EE_SELECTION_TOOL>();
EE_SELECTION& selection = selTool->RequestSelection();
SCH_SHEET_LIST selectedSheets;
SCH_SELECTION_TOOL* selTool = m_toolManager->GetTool<SCH_SELECTION_TOOL>();
SCH_SELECTION& selection = selTool->RequestSelection();
SCH_SHEET_LIST selectedSheets;
for( EDA_ITEM* item : selection.Items() )
{
@ -178,7 +178,7 @@ void SCH_EDIT_FRAME::DeleteAnnotation( ANNOTATE_SCOPE_T aAnnotateScope, bool aRe
}
std::unordered_set<SCH_SYMBOL*> getInferredSymbols( const EE_SELECTION& aSelection )
std::unordered_set<SCH_SYMBOL*> getInferredSymbols( const SCH_SELECTION& aSelection )
{
std::unordered_set<SCH_SYMBOL*> symbols;
@ -214,13 +214,13 @@ void SCH_EDIT_FRAME::AnnotateSymbols( SCH_COMMIT* aCommit, ANNOTATE_SCOPE_T aAn
bool aRecursive, int aStartNumber, bool aResetAnnotation,
bool aRepairTimestamps, REPORTER& aReporter )
{
EE_SELECTION_TOOL* selTool = m_toolManager->GetTool<EE_SELECTION_TOOL>();
EE_SELECTION& selection = selTool->GetSelection();
SCH_SELECTION_TOOL* selTool = m_toolManager->GetTool<SCH_SELECTION_TOOL>();
SCH_SELECTION& selection = selTool->GetSelection();
SCH_REFERENCE_LIST references;
SCH_SCREENS screens( Schematic().Root() );
SCH_SHEET_LIST sheets = Schematic().Hierarchy();
SCH_SHEET_PATH currentSheet = GetCurrentSheet();
SCH_REFERENCE_LIST references;
SCH_SCREENS screens( Schematic().Root() );
SCH_SHEET_LIST sheets = Schematic().Hierarchy();
SCH_SHEET_PATH currentSheet = GetCurrentSheet();
// Store the selected sheets relative to the full hierarchy so we get the correct sheet numbers
@ -498,8 +498,8 @@ int SCH_EDIT_FRAME::CheckAnnotate( ANNOTATION_ERROR_HANDLER aErrorHandler,
break;
case ANNOTATE_SELECTION:
EE_SELECTION_TOOL* selTool = m_toolManager->GetTool<EE_SELECTION_TOOL>();
EE_SELECTION& selection = selTool->RequestSelection();
SCH_SELECTION_TOOL* selTool = m_toolManager->GetTool<SCH_SELECTION_TOOL>();
SCH_SELECTION& selection = selTool->RequestSelection();
for( SCH_SYMBOL* symbol : getInferredSymbols( selection ) )
GetCurrentSheet().AppendSymbol( referenceList, symbol, false, true );

View File

@ -53,14 +53,10 @@
#include <boost/range/adaptor/reversed.hpp>
#include <sch_edit_frame.h>
#include <symbol.h>
#include <sch_line.h>
#include <sch_pin.h>
#include <kiface_base.h>
#include <algorithm>
#include <tool/tool_manager.h>
#include <tools/ee_selection_tool.h>
#include <eeschema_settings.h>
#include <core/arraydim.h>
#define FIELD_PADDING schIUScale.MilsToIU( 15 ) // arbitrarily chosen for aesthetics

View File

@ -29,12 +29,9 @@
#include <sch_junction.h>
#include <sch_line.h>
#include <sch_no_connect.h>
#include <sch_screen.h>
#include <sch_view.h>
#include <sch_commit.h>
#include <tool/tool_manager.h>
#include <tools/ee_actions.h>
#include <tools/ee_selection_tool.h>
#include <tools/sch_selection_tool.h>
#include <trigo.h>
@ -117,7 +114,7 @@ bool SCH_EDIT_FRAME::TrimWire( SCH_COMMIT* aCommit, const VECTOR2I& aStart, cons
void SCH_EDIT_FRAME::SchematicCleanUp( SCH_COMMIT* aCommit, SCH_SCREEN* aScreen )
{
EE_SELECTION_TOOL* selectionTool = m_toolManager->GetTool<EE_SELECTION_TOOL>();
SCH_SELECTION_TOOL* selectionTool = m_toolManager->GetTool<SCH_SELECTION_TOOL>();
std::vector<SCH_LINE*> lines;
std::vector<SCH_JUNCTION*> junctions;
std::vector<SCH_NO_CONNECT*> ncs;
@ -360,9 +357,9 @@ bool SCH_EDIT_FRAME::BreakSegmentsOnJunctions( SCH_COMMIT* aCommit, SCH_SCREEN*
void SCH_EDIT_FRAME::DeleteJunction( SCH_COMMIT* aCommit, SCH_ITEM* aJunction )
{
SCH_SCREEN* screen = GetScreen();
PICKED_ITEMS_LIST undoList;
EE_SELECTION_TOOL* selectionTool = m_toolManager->GetTool<EE_SELECTION_TOOL>();
SCH_SCREEN* screen = GetScreen();
PICKED_ITEMS_LIST undoList;
SCH_SELECTION_TOOL* selectionTool = m_toolManager->GetTool<SCH_SELECTION_TOOL>();
aJunction->SetFlags( STRUCT_DELETED );
RemoveFromScreen( aJunction, screen );

View File

@ -38,7 +38,7 @@
#include <project_sch.h>
#include <richio.h>
#include <symbol_lib_table.h>
#include <tools/ee_actions.h>
#include <tools/sch_actions.h>
#include <tools/sch_editor_control.h>
#include <advanced_config.h>
#include <widgets/design_block_pane.h>
@ -133,7 +133,7 @@ SCH_ITEM* SCH_EDITOR_CONTROL::FindSymbolAndItem( const wxString* aPath, const wx
{
BOX2I bbox = symbol->GetBoundingBox();
m_toolMgr->GetTool<EE_SELECTION_TOOL>()->ZoomFitCrossProbeBBox( bbox );
m_toolMgr->GetTool<SCH_SELECTION_TOOL>()->ZoomFitCrossProbeBBox( bbox );
}
if( pin )
@ -215,7 +215,7 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
}
else if( strcmp( idcmd, "$ERC" ) == 0 )
{
GetToolManager()->RunAction( EE_ACTIONS::runERC );
GetToolManager()->RunAction( SCH_ACTIONS::runERC );
return;
}
else if( strcmp( idcmd, "$NET:" ) == 0 )
@ -230,7 +230,7 @@ void SCH_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
else
m_highlightedConn = wxEmptyString;
GetToolManager()->RunAction( EE_ACTIONS::updateNetHighlighting );
GetToolManager()->RunAction( SCH_ACTIONS::updateNetHighlighting );
RefreshNetNavigator();
SetStatusText( _( "Selected net:" ) + wxS( " " ) + UnescapeString( netName ) );
@ -927,8 +927,8 @@ void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail )
m_syncingPcbToSchSelection = true; // recursion guard
GetToolManager()->GetTool<EE_SELECTION_TOOL>()->SyncSelection( sheetPath, focusItem,
items );
GetToolManager()->GetTool<SCH_SELECTION_TOOL>()->SyncSelection( sheetPath, focusItem,
items );
m_syncingPcbToSchSelection = false;
}

View File

@ -37,7 +37,7 @@
#include <kidialog.h>
#include <confirm.h>
#include <tool/tool_manager.h>
#include <ee_selection_tool.h>
#include <sch_selection_tool.h>
#include <dialogs/dialog_design_block_properties.h>
#include <nlohmann/json.hpp>
@ -370,7 +370,7 @@ void SCH_EDIT_FRAME::SaveSelectionAsDesignBlock( const wxString& aLibraryName )
}
// Get all selected items
EE_SELECTION selection = m_toolManager->GetTool<EE_SELECTION_TOOL>()->GetSelection();
SCH_SELECTION selection = m_toolManager->GetTool<SCH_SELECTION_TOOL>()->GetSelection();
if( selection.Empty() )
{

View File

@ -34,8 +34,8 @@
#include <wildcards_and_files_ext.h>
#include <sch_marker.h>
#include <connection_graph.h>
#include <tools/ee_actions.h>
#include <tools/ee_inspection_tool.h>
#include <tools/sch_actions.h>
#include <tools/sch_inspection_tool.h>
#include <dialog_erc.h>
#include <erc/erc.h>
#include <erc/erc_report.h>
@ -292,7 +292,7 @@ void DIALOG_ERC::OnDeleteOneClick( wxCommandEvent& aEvent )
if( m_notebook->GetSelection() == 0 )
{
// Clear the selection. It may be the selected ERC marker.
m_parent->GetToolManager()->RunAction( EE_ACTIONS::clearSelection );
m_parent->GetToolManager()->RunAction( SCH_ACTIONS::clearSelection );
m_markerTreeModel->DeleteCurrentItem( true );
@ -570,7 +570,7 @@ void DIALOG_ERC::OnERCItemSelected( wxDataViewEvent& aEvent )
if( !sheet.empty() && sheet != m_parent->GetCurrentSheet() )
{
m_parent->GetToolManager()->RunAction( ACTIONS::cancelInteractive );
m_parent->GetToolManager()->RunAction( EE_ACTIONS::clearSelection );
m_parent->GetToolManager()->RunAction( SCH_ACTIONS::clearSelection );
// Store the current zoom level into the current screen before switching
m_parent->GetScreen()->m_LastZoomLevel = m_parent->GetCanvas()->GetView()->GetScale();
@ -604,9 +604,9 @@ void DIALOG_ERC::OnERCItemDClick( wxDataViewEvent& aEvent )
void DIALOG_ERC::OnERCItemRClick( wxDataViewEvent& aEvent )
{
TOOL_MANAGER* toolMgr = m_parent->GetToolManager();
EE_INSPECTION_TOOL* inspectionTool = toolMgr->GetTool<EE_INSPECTION_TOOL>();
RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
TOOL_MANAGER* toolMgr = m_parent->GetToolManager();
SCH_INSPECTION_TOOL* inspectionTool = toolMgr->GetTool<SCH_INSPECTION_TOOL>();
RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aEvent.GetItem() );
if( !node )
return;
@ -836,7 +836,7 @@ void DIALOG_ERC::OnERCItemRClick( wxDataViewEvent& aEvent )
// Clear the selection before deleting markers. It may be some selected ERC markers.
// Deleting a selected marker without deselecting it first generates a crash
m_parent->GetToolManager()->RunAction( EE_ACTIONS::clearSelection );
m_parent->GetToolManager()->RunAction( SCH_ACTIONS::clearSelection );
SCH_SCREENS ScreenList( m_parent->Schematic().Root() );
ScreenList.DeleteMarkers( MARKER_BASE::MARKER_ERC, rcItem->GetErrorCode() );
@ -1016,7 +1016,7 @@ void DIALOG_ERC::deleteAllMarkers( bool aIncludeExclusions )
// Freeze to avoid repainting the dialog, which can cause a RePaint()
// of the screen as well
Freeze();
m_parent->GetToolManager()->RunAction( EE_ACTIONS::clearSelection );
m_parent->GetToolManager()->RunAction( SCH_ACTIONS::clearSelection );
m_markerTreeModel->DeleteItems( false, aIncludeExclusions, false );

View File

@ -35,7 +35,7 @@
#include <common.h>
#include <string_utils.h>
#include <sch_edit_frame.h>
#include <ee_collectors.h>
#include <sch_collectors.h>
#include <sch_symbol.h>
#include <template_fieldnames.h>
#include <symbol_library.h>

View File

@ -34,7 +34,7 @@
#include <schematic.h>
#include <sch_commit.h>
#include <tool/tool_manager.h>
#include <tools/ee_selection_tool.h>
#include <tools/sch_selection_tool.h>
#include <tools/sch_edit_tool.h>
#include <widgets/unit_binder.h>
#include <widgets/font_choice.h>
@ -69,7 +69,7 @@ static bool g_filterSelected;
class DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS : public DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE
{
SCH_EDIT_FRAME* m_parent;
EE_SELECTION m_selection;
SCH_SELECTION m_selection;
UNIT_BINDER m_textSize;
UNIT_BINDER m_lineWidth;
@ -162,7 +162,7 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::~DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS()
bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow()
{
EE_SELECTION_TOOL* selectionTool = m_parent->GetToolManager()->GetTool<EE_SELECTION_TOOL>();
SCH_SELECTION_TOOL* selectionTool = m_parent->GetToolManager()->GetTool<SCH_SELECTION_TOOL>();
m_selection = selectionTool->GetSelection();
m_references->SetValue( g_modifyReferences );

View File

@ -542,10 +542,10 @@ bool DIALOG_SYMBOL_FIELDS_TABLE::TransferDataToWindow()
if( !wxDialog::TransferDataFromWindow() )
return false;
TOOL_MANAGER* toolMgr = m_parent->GetToolManager();
EE_SELECTION_TOOL* selectionTool = toolMgr->GetTool<EE_SELECTION_TOOL>();
EE_SELECTION& selection = selectionTool->GetSelection();
SCH_SYMBOL* symbol = nullptr;
TOOL_MANAGER* toolMgr = m_parent->GetToolManager();
SCH_SELECTION_TOOL* selectionTool = toolMgr->GetTool<SCH_SELECTION_TOOL>();
SCH_SELECTION& selection = selectionTool->GetSelection();
SCH_SYMBOL* symbol = nullptr;
UpdateScope();
@ -1185,8 +1185,7 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnTableRangeSelected( wxGridRangeSelectEvent& a
}
else if( m_radioSelect->GetValue() )
{
EE_SELECTION_TOOL* selTool = m_parent->GetToolManager()->GetTool<EE_SELECTION_TOOL>();
SCH_SELECTION_TOOL* selTool = m_parent->GetToolManager()->GetTool<SCH_SELECTION_TOOL>();
std::vector<SCH_ITEM*> items( symbols.begin(), symbols.end() );
if( refs.size() > 0 )

View File

@ -37,7 +37,7 @@
#include <widgets/grid_combobox.h>
#include <widgets/std_bitmap_button.h>
#include <settings/settings_manager.h>
#include <ee_collectors.h>
#include <sch_collectors.h>
#include <symbol_library.h>
#include <fields_grid_table.h>
#include <sch_edit_frame.h>

View File

@ -22,7 +22,6 @@
*/
#include <kiplatform/ui.h>
#include <ee_actions.h>
#include <sch_edit_frame.h>
#include <widgets/color_swatch.h>
#include <widgets/grid_color_swatch_helpers.h>

View File

@ -22,7 +22,6 @@
*/
#include <gr_text.h>
#include <ee_actions.h>
#include <sch_edit_frame.h>
#include <widgets/bitmap_button.h>
#include <widgets/color_swatch.h>

View File

@ -27,7 +27,6 @@
#include <wildcards_and_files_ext.h>
#include <schematic.h>
#include <connection_graph.h>
#include <tools/ee_actions.h>
#include <tool/tool_manager.h>
#include <panel_setup_pinmap.h>
#include <erc/erc.h>

View File

@ -46,7 +46,7 @@
#include <zoom_defines.h>
#include <sim/spice_settings.h>
#include <tool/tool_manager.h>
#include <tools/ee_selection_tool.h>
#include <tools/sch_selection_tool.h>
/// Helper for all the old plotting/printing code while it still exists
@ -73,7 +73,7 @@ bool SCH_EDIT_FRAME::LoadProjectSettings()
PROJECT_LOCAL_SETTINGS& localSettings = Prj().GetLocalSettings();
EE_SELECTION_TOOL* selTool = GetToolManager()->GetTool<EE_SELECTION_TOOL>();
SCH_SELECTION_TOOL* selTool = GetToolManager()->GetTool<SCH_SELECTION_TOOL>();
selTool->GetFilter() = localSettings.m_SchSelectionFilter;
m_selectionFilterPanel->SetCheckboxesFromFilter( localSettings.m_SchSelectionFilter );
@ -243,7 +243,7 @@ void SCH_EDIT_FRAME::SaveProjectLocalSettings()
m_schematic->RecordERCExclusions();
PROJECT_LOCAL_SETTINGS& localSettings = Prj().GetLocalSettings();
EE_SELECTION_TOOL* selTool = GetToolManager()->GetTool<EE_SELECTION_TOOL>();
SCH_SELECTION_TOOL* selTool = GetToolManager()->GetTool<SCH_SELECTION_TOOL>();
localSettings.m_SchSelectionFilter = selTool->GetFilter();
}

View File

@ -71,9 +71,8 @@
#include <wx/log.h>
#include <wx/richmsgdlg.h>
#include <wx/stdpaths.h>
#include <tools/ee_actions.h>
#include <tools/ee_inspection_tool.h>
#include <tools/ee_selection_tool.h>
#include <tools/sch_inspection_tool.h>
#include <tools/sch_selection_tool.h>
#include <paths.h>
#include <wx_filename.h> // For ::ResolvePossibleSymlinks
#include <widgets/wx_progress_reporters.h>
@ -149,7 +148,7 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
ClearUndoRedoList();
ClearRepeatItemsList();
SetScreen( nullptr );
m_toolManager->GetTool<EE_INSPECTION_TOOL>()->Reset( TOOL_BASE::SUPERMODEL_RELOAD );
m_toolManager->GetTool<SCH_INSPECTION_TOOL>()->Reset( TOOL_BASE::SUPERMODEL_RELOAD );
CreateScreens();
}
@ -673,7 +672,7 @@ void SCH_EDIT_FRAME::OnImportProject( wxCommandEvent& aEvent )
eeconfig()->m_System.show_import_issues = importOptions.GetShowIssues();
// Don't leave dangling pointers to previously-opened document.
m_toolManager->GetTool<EE_SELECTION_TOOL>()->ClearSelection();
m_toolManager->GetTool<SCH_SELECTION_TOOL>()->ClearSelection();
ClearUndoRedoList();
ClearRepeatItemsList();

View File

@ -31,8 +31,8 @@
#include <tool/action_manager.h>
#include <tool/action_menu.h>
#include <tool/tool_manager.h>
#include <tools/ee_selection_tool.h>
#include <tools/ee_actions.h>
#include <tools/sch_selection_tool.h>
#include <tools/sch_actions.h>
#include "eeschema_id.h"
#include "sch_edit_frame.h"
#include <widgets/wx_menubar.h>
@ -41,7 +41,7 @@
void SCH_EDIT_FRAME::doReCreateMenuBar()
{
EE_SELECTION_TOOL* selTool = m_toolManager->GetTool<EE_SELECTION_TOOL>();
SCH_SELECTION_TOOL* selTool = m_toolManager->GetTool<SCH_SELECTION_TOOL>();
// wxWidgets handles the Mac Application menu behind the scenes, but that means
// we always have to start from scratch with a new wxMenuBar.
@ -89,7 +89,7 @@ void SCH_EDIT_FRAME::doReCreateMenuBar()
if( Kiface().IsSingle() )
fileMenu->Add( ACTIONS::saveAs );
else
fileMenu->Add( EE_ACTIONS::saveCurrSheetCopyAs );
fileMenu->Add( SCH_ACTIONS::saveCurrSheetCopyAs );
fileMenu->Add( ACTIONS::revert );
@ -105,9 +105,8 @@ void SCH_EDIT_FRAME::doReCreateMenuBar()
ID_IMPORT_NON_KICAD_SCH,
BITMAPS::import_document );
submenuImport->Add( EE_ACTIONS::importFPAssignments, ACTION_MENU::NORMAL,
_( "Footprint Assignments..." ) );
submenuImport->Add( EE_ACTIONS::importGraphics, ACTION_MENU::NORMAL, _( "Graphics..." ) );
submenuImport->Add( SCH_ACTIONS::importFPAssignments, ACTION_MENU::NORMAL, _( "Footprint Assignments..." ) );
submenuImport->Add( SCH_ACTIONS::importGraphics, ACTION_MENU::NORMAL, _( "Graphics..." ) );
fileMenu->Add( submenuImport );
@ -116,17 +115,14 @@ void SCH_EDIT_FRAME::doReCreateMenuBar()
ACTION_MENU* submenuExport = new ACTION_MENU( false, selTool );
submenuExport->SetTitle( _( "Export" ) );
submenuExport->SetIcon( BITMAPS::export_file );
submenuExport->Add( EE_ACTIONS::drawSheetOnClipboard, ACTION_MENU::NORMAL,
_( "Drawing to Clipboard" ) );
submenuExport->Add( EE_ACTIONS::exportNetlist, ACTION_MENU::NORMAL, _( "Netlist..." ) );
submenuExport->Add( EE_ACTIONS::exportSymbolsToLibrary, ACTION_MENU::NORMAL,
_( "Symbols to Library..." ) );
submenuExport->Add( EE_ACTIONS::exportSymbolsToNewLibrary, ACTION_MENU::NORMAL,
_( "Symbols to New Library..." ) );
submenuExport->Add( SCH_ACTIONS::drawSheetOnClipboard, ACTION_MENU::NORMAL, _( "Drawing to Clipboard" ) );
submenuExport->Add( SCH_ACTIONS::exportNetlist, ACTION_MENU::NORMAL, _( "Netlist..." ) );
submenuExport->Add( SCH_ACTIONS::exportSymbolsToLibrary, ACTION_MENU::NORMAL, _( "Symbols to Library..." ) );
submenuExport->Add( SCH_ACTIONS::exportSymbolsToNewLibrary, ACTION_MENU::NORMAL, _( "Symbols to New Library..." ) );
fileMenu->Add( submenuExport );
fileMenu->AppendSeparator();
fileMenu->Add( EE_ACTIONS::schematicSetup );
fileMenu->Add( SCH_ACTIONS::schematicSetup );
fileMenu->AppendSeparator();
fileMenu->Add( ACTIONS::pageSettings );
@ -162,17 +158,17 @@ void SCH_EDIT_FRAME::doReCreateMenuBar()
editMenu->AppendSeparator();
editMenu->Add( ACTIONS::deleteTool );
editMenu->Add( EE_ACTIONS::editTextAndGraphics );
editMenu->Add( EE_ACTIONS::changeSymbols );
editMenu->Add( EE_ACTIONS::editPageNumber );
editMenu->Add( SCH_ACTIONS::editTextAndGraphics );
editMenu->Add( SCH_ACTIONS::changeSymbols );
editMenu->Add( SCH_ACTIONS::editPageNumber );
ACTION_MENU* submenuAttributes = new ACTION_MENU( false, selTool );
submenuAttributes->SetTitle( _( "Attributes" ) );
submenuAttributes->Add( EE_ACTIONS::setExcludeFromSimulation, ACTION_MENU::CHECK );
submenuAttributes->Add( EE_ACTIONS::setExcludeFromBOM, ACTION_MENU::CHECK );
submenuAttributes->Add( EE_ACTIONS::setExcludeFromBoard, ACTION_MENU::CHECK );
submenuAttributes->Add( EE_ACTIONS::setDNP, ACTION_MENU::CHECK );
submenuAttributes->Add( SCH_ACTIONS::setExcludeFromSimulation, ACTION_MENU::CHECK );
submenuAttributes->Add( SCH_ACTIONS::setExcludeFromBOM, ACTION_MENU::CHECK );
submenuAttributes->Add( SCH_ACTIONS::setExcludeFromBoard, ACTION_MENU::CHECK );
submenuAttributes->Add( SCH_ACTIONS::setDNP, ACTION_MENU::CHECK );
editMenu->Add( submenuAttributes );
@ -186,13 +182,13 @@ void SCH_EDIT_FRAME::doReCreateMenuBar()
showHidePanels->Add( ACTIONS::showProperties, ACTION_MENU::CHECK );
showHidePanels->Add( ACTIONS::showSearch, ACTION_MENU::CHECK );
showHidePanels->Add( EE_ACTIONS::showHierarchy, ACTION_MENU::CHECK );
showHidePanels->Add( SCH_ACTIONS::showHierarchy, ACTION_MENU::CHECK );
if( ADVANCED_CFG::GetCfg().m_IncrementalConnectivity )
showHidePanels->Add( EE_ACTIONS::showNetNavigator, ACTION_MENU::CHECK );
showHidePanels->Add( SCH_ACTIONS::showNetNavigator, ACTION_MENU::CHECK );
if( ADVANCED_CFG::GetCfg().m_EnableDesignBlocks )
showHidePanels->Add( EE_ACTIONS::showDesignBlockPanel, ACTION_MENU::CHECK,
showHidePanels->Add( SCH_ACTIONS::showDesignBlockPanel, ACTION_MENU::CHECK,
_( "Design Blocks" ) );
viewMenu->Add( showHidePanels );
@ -209,25 +205,25 @@ void SCH_EDIT_FRAME::doReCreateMenuBar()
viewMenu->Add( ACTIONS::zoomRedraw );
viewMenu->AppendSeparator();
viewMenu->Add( EE_ACTIONS::navigateBack );
viewMenu->Add( EE_ACTIONS::navigateUp );
viewMenu->Add( EE_ACTIONS::navigateForward );
viewMenu->Add( EE_ACTIONS::navigatePrevious );
viewMenu->Add( EE_ACTIONS::navigateNext );
viewMenu->Add( SCH_ACTIONS::navigateBack );
viewMenu->Add( SCH_ACTIONS::navigateUp );
viewMenu->Add( SCH_ACTIONS::navigateForward );
viewMenu->Add( SCH_ACTIONS::navigatePrevious );
viewMenu->Add( SCH_ACTIONS::navigateNext );
viewMenu->AppendSeparator();
viewMenu->Add( EE_ACTIONS::toggleHiddenPins, ACTION_MENU::CHECK );
viewMenu->Add( EE_ACTIONS::toggleHiddenFields, ACTION_MENU::CHECK );
viewMenu->Add( EE_ACTIONS::toggleDirectiveLabels, ACTION_MENU::CHECK );
viewMenu->Add( EE_ACTIONS::toggleERCErrors, ACTION_MENU::CHECK );
viewMenu->Add( EE_ACTIONS::toggleERCWarnings, ACTION_MENU::CHECK );
viewMenu->Add( EE_ACTIONS::toggleERCExclusions, ACTION_MENU::CHECK );
viewMenu->Add( EE_ACTIONS::markSimExclusions, ACTION_MENU::CHECK );
viewMenu->Add( EE_ACTIONS::toggleOPVoltages, ACTION_MENU::CHECK );
viewMenu->Add( EE_ACTIONS::toggleOPCurrents, ACTION_MENU::CHECK );
viewMenu->Add( EE_ACTIONS::togglePinAltIcons, ACTION_MENU::CHECK );
viewMenu->Add( SCH_ACTIONS::toggleHiddenPins, ACTION_MENU::CHECK );
viewMenu->Add( SCH_ACTIONS::toggleHiddenFields, ACTION_MENU::CHECK );
viewMenu->Add( SCH_ACTIONS::toggleDirectiveLabels, ACTION_MENU::CHECK );
viewMenu->Add( SCH_ACTIONS::toggleERCErrors, ACTION_MENU::CHECK );
viewMenu->Add( SCH_ACTIONS::toggleERCWarnings, ACTION_MENU::CHECK );
viewMenu->Add( SCH_ACTIONS::toggleERCExclusions, ACTION_MENU::CHECK );
viewMenu->Add( SCH_ACTIONS::markSimExclusions, ACTION_MENU::CHECK );
viewMenu->Add( SCH_ACTIONS::toggleOPVoltages, ACTION_MENU::CHECK );
viewMenu->Add( SCH_ACTIONS::toggleOPCurrents, ACTION_MENU::CHECK );
viewMenu->Add( SCH_ACTIONS::togglePinAltIcons, ACTION_MENU::CHECK );
#ifdef __APPLE__
viewMenu->AppendSeparator();
@ -237,54 +233,54 @@ void SCH_EDIT_FRAME::doReCreateMenuBar()
//
ACTION_MENU* placeMenu = new ACTION_MENU( false, selTool );
placeMenu->Add( EE_ACTIONS::placeSymbol );
placeMenu->Add( EE_ACTIONS::placePower );
placeMenu->Add( EE_ACTIONS::drawWire );
placeMenu->Add( EE_ACTIONS::drawBus );
placeMenu->Add( EE_ACTIONS::placeBusWireEntry );
placeMenu->Add( EE_ACTIONS::placeNoConnect );
placeMenu->Add( EE_ACTIONS::placeJunction );
placeMenu->Add( EE_ACTIONS::placeLabel );
placeMenu->Add( EE_ACTIONS::placeGlobalLabel );
placeMenu->Add( EE_ACTIONS::placeClassLabel );
placeMenu->Add( EE_ACTIONS::drawRuleArea );
placeMenu->Add( SCH_ACTIONS::placeSymbol );
placeMenu->Add( SCH_ACTIONS::placePower );
placeMenu->Add( SCH_ACTIONS::drawWire );
placeMenu->Add( SCH_ACTIONS::drawBus );
placeMenu->Add( SCH_ACTIONS::placeBusWireEntry );
placeMenu->Add( SCH_ACTIONS::placeNoConnect );
placeMenu->Add( SCH_ACTIONS::placeJunction );
placeMenu->Add( SCH_ACTIONS::placeLabel );
placeMenu->Add( SCH_ACTIONS::placeGlobalLabel );
placeMenu->Add( SCH_ACTIONS::placeClassLabel );
placeMenu->Add( SCH_ACTIONS::drawRuleArea );
placeMenu->AppendSeparator();
placeMenu->Add( EE_ACTIONS::placeHierLabel );
placeMenu->Add( EE_ACTIONS::drawSheet );
placeMenu->Add( EE_ACTIONS::placeSheetPin );
placeMenu->Add( EE_ACTIONS::syncAllSheetsPins );
placeMenu->Add( EE_ACTIONS::importSheet );
placeMenu->Add( SCH_ACTIONS::placeHierLabel );
placeMenu->Add( SCH_ACTIONS::drawSheet );
placeMenu->Add( SCH_ACTIONS::placeSheetPin );
placeMenu->Add( SCH_ACTIONS::syncAllSheetsPins );
placeMenu->Add( SCH_ACTIONS::importSheet );
placeMenu->AppendSeparator();
placeMenu->Add( EE_ACTIONS::placeSchematicText );
placeMenu->Add( EE_ACTIONS::drawTextBox );
placeMenu->Add( EE_ACTIONS::drawTable );
placeMenu->Add( EE_ACTIONS::drawRectangle );
placeMenu->Add( EE_ACTIONS::drawCircle );
placeMenu->Add( EE_ACTIONS::drawArc );
placeMenu->Add( EE_ACTIONS::drawBezier );
placeMenu->Add( EE_ACTIONS::drawLines );
placeMenu->Add( EE_ACTIONS::placeImage );
placeMenu->Add( SCH_ACTIONS::placeSchematicText );
placeMenu->Add( SCH_ACTIONS::drawTextBox );
placeMenu->Add( SCH_ACTIONS::drawTable );
placeMenu->Add( SCH_ACTIONS::drawRectangle );
placeMenu->Add( SCH_ACTIONS::drawCircle );
placeMenu->Add( SCH_ACTIONS::drawArc );
placeMenu->Add( SCH_ACTIONS::drawBezier );
placeMenu->Add( SCH_ACTIONS::drawLines );
placeMenu->Add( SCH_ACTIONS::placeImage );
//-- Inspect menu -----------------------------------------------
//
ACTION_MENU* inspectMenu = new ACTION_MENU( false, selTool );
inspectMenu->Add( EE_ACTIONS::showBusSyntaxHelp );
inspectMenu->Add( SCH_ACTIONS::showBusSyntaxHelp );
inspectMenu->AppendSeparator();
inspectMenu->Add( EE_ACTIONS::runERC );
inspectMenu->Add( SCH_ACTIONS::runERC );
inspectMenu->Add( ACTIONS::prevMarker );
inspectMenu->Add( ACTIONS::nextMarker );
inspectMenu->Add( ACTIONS::excludeMarker );
inspectMenu->AppendSeparator();
inspectMenu->Add( EE_ACTIONS::diffSymbol );
inspectMenu->Add( SCH_ACTIONS::diffSymbol );
inspectMenu->AppendSeparator();
inspectMenu->Add( EE_ACTIONS::showSimulator );
inspectMenu->Add( SCH_ACTIONS::showSimulator );
//-- Tools menu -----------------------------------------------
@ -294,34 +290,34 @@ void SCH_EDIT_FRAME::doReCreateMenuBar()
wxMenuItem* update = toolsMenu->Add( ACTIONS::updatePcbFromSchematic );
update->Enable( !Kiface().IsSingle() );
toolsMenu->Add( EE_ACTIONS::showPcbNew );
toolsMenu->Add( SCH_ACTIONS::showPcbNew );
if( !Kiface().IsSingle() )
toolsMenu->Add( ACTIONS::showProjectManager );
toolsMenu->AppendSeparator();
toolsMenu->Add( ACTIONS::showSymbolEditor );
toolsMenu->Add( EE_ACTIONS::updateSymbols );
toolsMenu->Add( SCH_ACTIONS::updateSymbols );
toolsMenu->AppendSeparator();
toolsMenu->Add( EE_ACTIONS::rescueSymbols );
toolsMenu->Add( EE_ACTIONS::remapSymbols );
toolsMenu->Add( SCH_ACTIONS::rescueSymbols );
toolsMenu->Add( SCH_ACTIONS::remapSymbols );
if( ADVANCED_CFG::GetCfg().m_ShowRepairSchematic )
toolsMenu->Add( EE_ACTIONS::repairSchematic );
toolsMenu->Add( SCH_ACTIONS::repairSchematic );
toolsMenu->AppendSeparator();
toolsMenu->Add( EE_ACTIONS::editSymbolFields );
toolsMenu->Add( EE_ACTIONS::editSymbolLibraryLinks );
toolsMenu->Add( SCH_ACTIONS::editSymbolFields );
toolsMenu->Add( SCH_ACTIONS::editSymbolLibraryLinks );
toolsMenu->AppendSeparator();
toolsMenu->Add( EE_ACTIONS::annotate );
toolsMenu->Add( EE_ACTIONS::incrementAnnotations );
toolsMenu->Add( SCH_ACTIONS::annotate );
toolsMenu->Add( SCH_ACTIONS::incrementAnnotations );
toolsMenu->AppendSeparator();
toolsMenu->Add( EE_ACTIONS::assignFootprints );
toolsMenu->Add( EE_ACTIONS::generateBOM );
toolsMenu->Add( EE_ACTIONS::generateBOMLegacy );
toolsMenu->Add( SCH_ACTIONS::assignFootprints );
toolsMenu->Add( SCH_ACTIONS::generateBOM );
toolsMenu->Add( SCH_ACTIONS::generateBOMLegacy );
toolsMenu->AppendSeparator();
update = toolsMenu->Add( ACTIONS::updateSchematicFromPcb );

View File

@ -35,7 +35,7 @@
#include <trace_helpers.h>
#include <connection_graph.h>
#include <widgets/wx_aui_utils.h>
#include <tools/ee_actions.h>
#include <tools/sch_actions.h>
static wxString GetNetNavigatorItemText( const SCH_ITEM* aItem,
@ -542,7 +542,7 @@ void SCH_EDIT_FRAME::onNetNavigatorSelection( wxTreeEvent& aEvent )
if( GetCurrentSheet() != itemData->GetSheetPath() )
{
GetToolManager()->RunAction<SCH_SHEET_PATH*>( EE_ACTIONS::changeSheet,
GetToolManager()->RunAction<SCH_SHEET_PATH*>( SCH_ACTIONS::changeSheet,
&itemData->GetSheetPath() );
}

View File

@ -30,7 +30,7 @@
#include <core/kicad_algo.h>
#include <symbol_library_common.h>
#include <confirm.h>
#include <ee_tool_utils.h>
#include <sch_tool_utils.h>
#include <eeschema_id.h>
#include <general.h>
#include <kidialog.h>
@ -43,7 +43,7 @@
#include <sch_edit_frame.h>
#include <symbol_lib_table.h>
#include <tool/tool_manager.h>
#include <tools/ee_actions.h>
#include <tools/sch_actions.h>
#include <project_sch.h>
#include <dialog_symbol_chooser.h>
@ -212,7 +212,7 @@ void SCH_EDIT_FRAME::FlipBodyStyle( SCH_SYMBOL* aSymbol )
// If selected make sure all the now-included pins are selected
if( aSymbol->IsSelected() )
m_toolManager->RunAction<EDA_ITEM*>( EE_ACTIONS::addItemToSel, aSymbol );
m_toolManager->RunAction<EDA_ITEM*>( SCH_ACTIONS::addItemToSel, aSymbol );
commit.Push( _( "Change Body Style" ) );
}

View File

@ -20,7 +20,7 @@
#include "sch_printout.h"
#include <tool/tool_manager.h>
#include <tools/ee_selection_tool.h>
#include <tools/sch_selection_tool.h>
#include <sch_edit_frame.h>
#include <math/vector2wx.h>
#include <pgm_base.h>
@ -138,10 +138,10 @@ bool SCH_PRINTOUT::PrintPage( SCH_SCREEN* aScreen, wxDC* aDC, bool aForPrinting
painter->SetSchematic( &m_parent->Schematic() );
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EESCHEMA_SETTINGS* cfg = m_parent->eeconfig();
COLOR_SETTINGS* theme = mgr.GetColorSettings( cfg->m_Printing.color_theme );
EE_SELECTION_TOOL* selTool = m_parent->GetToolManager()->GetTool<EE_SELECTION_TOOL>();
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EESCHEMA_SETTINGS* cfg = m_parent->eeconfig();
COLOR_SETTINGS* theme = mgr.GetColorSettings( cfg->m_Printing.color_theme );
SCH_SELECTION_TOOL* selTool = m_parent->GetToolManager()->GetTool<SCH_SELECTION_TOOL>();
// Target paper size
wxRect pageSizePix;

View File

@ -47,8 +47,7 @@
#include <tool/action_toolbar.h>
#include <tool/tool_manager.h>
#include <tool/tool_dispatcher.h>
#include <tools/ee_actions.h>
#include <tools/ee_selection_tool.h>
#include <tools/sch_selection_tool.h>
#include <view/view_controls.h>
#include <wx/choicdlg.h>
#include <wx/fswatcher.h>
@ -111,7 +110,7 @@ SCH_BASE_FRAME::SCH_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aWindo
// wxWidgets, we can't get modifier-key-up events.
if( m_toolManager )
{
EE_SELECTION_TOOL* selTool = m_toolManager->GetTool<EE_SELECTION_TOOL>();
SCH_SELECTION_TOOL* selTool = m_toolManager->GetTool<SCH_SELECTION_TOOL>();
if( selTool )
selTool->OnIdle( aEvent );
@ -434,9 +433,9 @@ void SCH_BASE_FRAME::RefreshZoomDependentItems()
// items.
if( m_toolManager )
{
EE_SELECTION_TOOL* selectionTool = m_toolManager->GetTool<EE_SELECTION_TOOL>();
SELECTION& selection = selectionTool->GetSelection();
KIGFX::SCH_VIEW* view = GetCanvas()->GetView();
SCH_SELECTION_TOOL* selectionTool = m_toolManager->GetTool<SCH_SELECTION_TOOL>();
SELECTION& selection = selectionTool->GetSelection();
KIGFX::SCH_VIEW* view = GetCanvas()->GetView();
for( EDA_ITEM* item : selection )
{

View File

@ -25,7 +25,7 @@
#include <macros.h>
#include <trace_helpers.h>
#include <ee_collectors.h>
#include <sch_collectors.h>
#include <sch_bus_entry.h>
#include <sch_symbol.h>
#include <sch_line.h>
@ -35,7 +35,7 @@
#include "sch_reference_list.h"
const std::vector<KICAD_T> EE_COLLECTOR::EditableItems = {
const std::vector<KICAD_T> SCH_COLLECTOR::EditableItems = {
SCH_SHAPE_T,
SCH_TEXT_T,
SCH_TEXTBOX_T,
@ -56,7 +56,7 @@ const std::vector<KICAD_T> EE_COLLECTOR::EditableItems = {
};
const std::vector<KICAD_T> EE_COLLECTOR::MovableItems =
const std::vector<KICAD_T> SCH_COLLECTOR::MovableItems =
{
SCH_MARKER_T,
SCH_JUNCTION_T,
@ -82,21 +82,21 @@ const std::vector<KICAD_T> EE_COLLECTOR::MovableItems =
};
const std::vector<KICAD_T> EE_COLLECTOR::FieldOwners = {
const std::vector<KICAD_T> SCH_COLLECTOR::FieldOwners = {
SCH_SYMBOL_T,
SCH_SHEET_T,
SCH_LABEL_LOCATE_ANY_T
};
INSPECT_RESULT EE_COLLECTOR::Inspect( EDA_ITEM* aItem, void* aTestData )
INSPECT_RESULT SCH_COLLECTOR::Inspect( EDA_ITEM* aItem, void* aTestData )
{
if( m_Unit || m_BodyStyle )
{
SCH_ITEM* schItem = dynamic_cast<SCH_ITEM*>( aItem );
// Special selection rules apply to pins of different units when edited in synchronized
// pins mode. Leave it to EE_SELECTION_TOOL::Selectable() to decide what to do with them.
// pins mode. Leave it to SCH_SELECTION_TOOL::Selectable() to decide what to do with them.
if( schItem && schItem->Type() != SCH_PIN_T )
{
@ -120,8 +120,8 @@ INSPECT_RESULT EE_COLLECTOR::Inspect( EDA_ITEM* aItem, void* aTestData )
}
void EE_COLLECTOR::Collect( SCH_SCREEN* aScreen, const std::vector<KICAD_T>& aFilterList,
const VECTOR2I& aPos, int aUnit, int aConvert )
void SCH_COLLECTOR::Collect( SCH_SCREEN* aScreen, const std::vector<KICAD_T>& aFilterList,
const VECTOR2I& aPos, int aUnit, int aConvert )
{
Empty(); // empty the collection just in case
@ -140,8 +140,8 @@ void EE_COLLECTOR::Collect( SCH_SCREEN* aScreen, const std::vector<KICAD_T>& aFi
}
void EE_COLLECTOR::Collect( LIB_ITEMS_CONTAINER& aItems, const std::vector<KICAD_T>& aFilterList,
const VECTOR2I& aPos, int aUnit, int aConvert )
void SCH_COLLECTOR::Collect( LIB_ITEMS_CONTAINER& aItems, const std::vector<KICAD_T>& aFilterList,
const VECTOR2I& aPos, int aUnit, int aConvert )
{
Empty(); // empty the collection just in case
@ -160,7 +160,7 @@ void EE_COLLECTOR::Collect( LIB_ITEMS_CONTAINER& aItems, const std::vector<KICAD
}
bool EE_COLLECTOR::IsCorner() const
bool SCH_COLLECTOR::IsCorner() const
{
if( GetCount() != 2 )
return false;

View File

@ -23,8 +23,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef EE_COLLECTORS_H
#define EE_COLLECTORS_H
#ifndef SCH_COLLECTORS_H
#define SCH_COLLECTORS_H
#include <lib_symbol.h>
#include <collector.h>
@ -36,14 +36,14 @@ class SCH_SHEET_PATH;
class SCH_SYMBOL;
class EE_COLLECTOR : public COLLECTOR
class SCH_COLLECTOR : public COLLECTOR
{
public:
static const std::vector<KICAD_T> EditableItems;
static const std::vector<KICAD_T> MovableItems;
static const std::vector<KICAD_T> FieldOwners;
EE_COLLECTOR( const std::vector<KICAD_T>& aScanTypes = { SCH_LOCATE_ANY_T } ) :
SCH_COLLECTOR( const std::vector<KICAD_T>& aScanTypes = { SCH_LOCATE_ANY_T } ) :
m_Unit( 0 ),
m_BodyStyle( 0 ),
m_ShowPinElectricalTypes( false )
@ -111,4 +111,4 @@ public:
void CollectOtherUnits( const wxString& thisRef, int thisUnit, const LIB_ID& aLibId,
SCH_SHEET_PATH& aSheet, std::vector<SCH_SYMBOL*>* otherUnits );
#endif // EE_COLLECTORS_H
#endif // SCH_COLLECTORS_H

View File

@ -23,7 +23,7 @@
#include <macros.h>
#include <tool/tool_manager.h>
#include <tools/ee_tool_base.h>
#include <tools/sch_tool_base.h>
#include <lib_symbol.h>
@ -47,7 +47,7 @@ SCH_COMMIT::SCH_COMMIT( TOOL_MANAGER* aToolMgr ) :
}
SCH_COMMIT::SCH_COMMIT( EE_TOOL_BASE<SCH_BASE_FRAME>* aTool )
SCH_COMMIT::SCH_COMMIT( SCH_TOOL_BASE<SCH_BASE_FRAME>* aTool )
{
m_toolMgr = aTool->GetManager();
m_isLibEditor = aTool->IsSymbolEditor();
@ -180,7 +180,7 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
KIGFX::VIEW* view = m_toolMgr->GetView();
SCH_EDIT_FRAME* frame = static_cast<SCH_EDIT_FRAME*>( m_toolMgr->GetToolHolder() );
EE_SELECTION_TOOL* selTool = m_toolMgr->GetTool<EE_SELECTION_TOOL>();
SCH_SELECTION_TOOL* selTool = m_toolMgr->GetTool<SCH_SELECTION_TOOL>();
bool itemsDeselected = false;
bool selectedModified = false;
bool dirtyConnectivity = false;
@ -488,9 +488,9 @@ void SCH_COMMIT::revertLibEdit()
return;
// Symbol editor just saves copies of the whole symbol, so grab the first and discard the rest
SYMBOL_EDIT_FRAME* frame = dynamic_cast<SYMBOL_EDIT_FRAME*>( m_toolMgr->GetToolHolder() );
LIB_SYMBOL* copy = dynamic_cast<LIB_SYMBOL*>( m_changes.front().m_copy );
EE_SELECTION_TOOL* selTool = m_toolMgr->GetTool<EE_SELECTION_TOOL>();
SYMBOL_EDIT_FRAME* frame = dynamic_cast<SYMBOL_EDIT_FRAME*>( m_toolMgr->GetToolHolder() );
LIB_SYMBOL* copy = dynamic_cast<LIB_SYMBOL*>( m_changes.front().m_copy );
SCH_SELECTION_TOOL* selTool = m_toolMgr->GetTool<SCH_SELECTION_TOOL>();
if( frame && copy )
{
@ -510,10 +510,10 @@ void SCH_COMMIT::revertLibEdit()
void SCH_COMMIT::Revert()
{
KIGFX::VIEW* view = m_toolMgr->GetView();
SCH_EDIT_FRAME* frame = dynamic_cast<SCH_EDIT_FRAME*>( m_toolMgr->GetToolHolder() );
EE_SELECTION_TOOL* selTool = m_toolMgr->GetTool<EE_SELECTION_TOOL>();
SCH_SHEET_LIST sheets;
KIGFX::VIEW* view = m_toolMgr->GetView();
SCH_EDIT_FRAME* frame = dynamic_cast<SCH_EDIT_FRAME*>( m_toolMgr->GetToolHolder() );
SCH_SELECTION_TOOL* selTool = m_toolMgr->GetTool<SCH_SELECTION_TOOL>();
SCH_SHEET_LIST sheets;
if( m_changes.empty() )
return;

View File

@ -36,7 +36,7 @@ class EDA_DRAW_FRAME;
class TOOL_BASE;
template<class T>
class EE_TOOL_BASE;
class SCH_TOOL_BASE;
#define SKIP_UNDO 0x0001
#define APPEND_UNDO 0x0002
@ -47,7 +47,7 @@ class SCH_COMMIT : public COMMIT
public:
SCH_COMMIT( TOOL_MANAGER* aToolMgr );
SCH_COMMIT( EDA_DRAW_FRAME* aFrame );
SCH_COMMIT( EE_TOOL_BASE<SCH_BASE_FRAME>* aFrame );
SCH_COMMIT( SCH_TOOL_BASE<SCH_BASE_FRAME>* aFrame );
virtual ~SCH_COMMIT();

Some files were not shown because too many files have changed in this diff Show More