ADDED netclass assignment from PCB canvas.

Fixes https://gitlab.com/kicad/code/kicad/issues/5975
This commit is contained in:
Jeff Young 2022-09-03 19:29:02 +01:00
parent b1e5cb5a56
commit c30a557810
112 changed files with 446 additions and 456 deletions

View File

@ -106,6 +106,8 @@ set( COMMON_ABOUT_DLG_SRCS
)
set( COMMON_DLG_SRCS
dialogs/dialog_assign_netclass.cpp
dialogs/dialog_assign_netclass_base.cpp
dialogs/dialog_color_picker.cpp
dialogs/dialog_color_picker_base.cpp
dialogs/dialog_configure_paths.cpp
@ -152,9 +154,6 @@ set( COMMON_DLG_SRCS
dialogs/panel_setup_severities.cpp
dialogs/panel_text_variables.cpp
dialogs/panel_text_variables_base.cpp
dialogs/wx_html_report_box.cpp
dialogs/wx_html_report_panel.cpp
dialogs/wx_html_report_panel_base.cpp
)
if( KICAD_USE_SENTRY )
@ -204,6 +203,9 @@ set( COMMON_WIDGET_SRCS
widgets/wx_combobox.cpp
widgets/wx_ellipsized_static_text.cpp
widgets/wx_grid.cpp
widgets/wx_html_report_box.cpp
widgets/wx_html_report_panel.cpp
widgets/wx_html_report_panel_base.cpp
widgets/wx_listbox.cpp
widgets/wx_panel.cpp
widgets/wx_progress_reporters.cpp

View File

@ -22,16 +22,17 @@
*/
#include <dialogs/dialog_assign_netclass.h>
#include <dialogs/wx_html_report_box.h>
#include <sch_edit_frame.h>
#include <widgets/wx_html_report_box.h>
#include <project.h>
#include <project/project_file.h>
#include <project/net_settings.h>
#include <schematic.h>
DIALOG_ASSIGN_NETCLASS::DIALOG_ASSIGN_NETCLASS( SCH_EDIT_FRAME* aParent, const wxString aNetName ) :
DIALOG_ASSIGN_NETCLASS::DIALOG_ASSIGN_NETCLASS( EDA_BASE_FRAME* aParent, const wxString aNetName,
const std::set<wxString> aCandidateNetNames ) :
DIALOG_ASSIGN_NETCLASS_BASE( aParent ),
m_frame( aParent )
m_frame( aParent ),
m_netCandidates( aCandidateNetNames )
{
std::shared_ptr<NET_SETTINGS>& netSettings = m_frame->Prj().GetProjectFile().m_NetSettings;
@ -86,7 +87,7 @@ void DIALOG_ASSIGN_NETCLASS::OnUpdateUI( wxUpdateUIEvent& event )
m_matchingNets->Report( _( "<b>Currently matching nets:</b>" ) );
for( const wxString& net : m_frame->Schematic().GetNetClassAssignmentCandidates() )
for( const wxString& net : m_netCandidates )
{
int matches;
int offset;

View File

@ -5,7 +5,7 @@
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialogs/wx_html_report_box.h"
#include "widgets/wx_html_report_box.h"
#include "dialog_assign_netclass_base.h"

View File

@ -383,7 +383,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxHW_SCROLLBAR_AUTO</property>
<property name="subclass">WX_HTML_REPORT_BOX; dialogs/wx_html_report_box.h; forward_declare</property>
<property name="subclass">WX_HTML_REPORT_BOX; widgets/wx_html_report_box.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>

View File

@ -33,7 +33,7 @@
#include <confirm.h>
#include <grid_tricks.h>
#include <dialogs/panel_setup_netclasses.h>
#include <dialogs/wx_html_report_box.h>
#include "widgets/wx_html_report_box.h"
#include <tool/tool_manager.h>
#include <widgets/wx_grid.h>
#include <string_utils.h>
@ -75,7 +75,7 @@ wxArrayString g_lineStyleNames;
PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, EDA_DRAW_FRAME* aFrame,
std::shared_ptr<NET_SETTINGS> aNetSettings,
const std::vector<wxString>& aNetNames,
const std::set<wxString>& aNetNames,
bool aIsEEschema ) :
PANEL_SETUP_NETCLASSES_BASE( aParent->GetTreebook() ),
m_frame( aFrame ),

View File

@ -5,8 +5,8 @@
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialogs/wx_html_report_box.h"
#include "widgets/wx_grid.h"
#include "widgets/wx_html_report_box.h"
#include "panel_setup_netclasses_base.h"

View File

@ -796,7 +796,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxHW_SCROLLBAR_AUTO</property>
<property name="subclass">WX_HTML_REPORT_BOX; dialogs/wx_html_report_box.h; forward_declare</property>
<property name="subclass">WX_HTML_REPORT_BOX; widgets/wx_html_report_box.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>

View File

@ -547,13 +547,13 @@ void EDA_DRAW_FRAME::AddStandardSubMenus( TOOL_MENU& aToolMenu )
aMenu.AddSeparator( 1000 );
auto zoomMenu = std::make_shared<ZOOM_MENU>( this );
std::shared_ptr<ZOOM_MENU> zoomMenu = std::make_shared<ZOOM_MENU>( this );
zoomMenu->SetTool( commonTools );
aToolMenu.AddSubMenu( zoomMenu );
aToolMenu.RegisterSubMenu( zoomMenu );
auto gridMenu = std::make_shared<GRID_MENU>( this );
std::shared_ptr<GRID_MENU> gridMenu = std::make_shared<GRID_MENU>( this );
gridMenu->SetTool( commonTools );
aToolMenu.AddSubMenu( gridMenu );
aToolMenu.RegisterSubMenu( gridMenu );
aMenu.AddMenu( zoomMenu.get(), SELECTION_CONDITIONS::ShowAlways, 1000 );
aMenu.AddMenu( gridMenu.get(), SELECTION_CONDITIONS::ShowAlways, 1000 );

View File

@ -28,7 +28,7 @@
#include <macros.h>
#include <reporter.h>
#include <widgets/infobar.h>
#include <wx_html_report_panel.h>
#include <widgets/wx_html_report_panel.h>
#include <wx/log.h>
#include <wx/textctrl.h>
#include <wx/statusbr.h>

View File

@ -47,7 +47,7 @@ CONDITIONAL_MENU& TOOL_MENU::GetMenu()
}
void TOOL_MENU::AddSubMenu( std::shared_ptr<ACTION_MENU> aSubMenu )
void TOOL_MENU::RegisterSubMenu( std::shared_ptr<ACTION_MENU> aSubMenu )
{
// store a copy of the menu (keeps a reference)
m_subMenus.push_back( std::move( aSubMenu ) );

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020-2021 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2020-2022 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -62,13 +62,13 @@ public:
private:
void onThemeChanged( wxSysColourChangedEvent &aEvent );
wxString addHeader( const wxString& aBody );
wxString generateHtml( const wxString& aLine );
private:
EDA_UNITS m_units;
// Indicates messages should be flushed as they are added. Required for progress-related
// reports, but can be very slow for larger reports.
///< Indicates messages should be flushed as they are added. Required for progress-related
///< reports, but can be very slow for larger reports.
bool m_immediateMode;
///< copy of the report, stored for filtering

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="15" />
<FileVersion major="1" minor="16" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
@ -14,6 +14,7 @@
<property name="file">wx_html_report_panel_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">WX_HTML_REPORT_PANEL_BASE</property>
@ -25,6 +26,7 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Panel" expanded="1">
@ -46,6 +48,7 @@
<property name="size">-1,-1</property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property>
@ -714,6 +717,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -20,10 +20,10 @@
#include <wx/stattext.h>
#include <wx/checkbox.h>
#include <widgets/number_badge.h>
#include <wx/button.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/panel.h>
@ -65,6 +65,7 @@ class WX_HTML_REPORT_PANEL_BASE : public wxPanel
public:
WX_HTML_REPORT_PANEL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~WX_HTML_REPORT_PANEL_BASE();
};

View File

@ -57,8 +57,6 @@ set( EESCHEMA_SCH_PLUGINS_CADSTAR
set( EESCHEMA_DLGS
dialogs/dialog_annotate.cpp
dialogs/dialog_annotate_base.cpp
dialogs/dialog_assign_netclass.cpp
dialogs/dialog_assign_netclass_base.cpp
dialogs/dialog_bom.cpp
dialogs/dialog_bom_base.cpp
dialogs/dialog_change_symbols.cpp

View File

@ -30,7 +30,7 @@
#include <dialog_annotate_base.h>
#include <eeschema_settings.h>
#include <kiface_base.h>
#include <wx_html_report_panel.h>
#include <widgets/wx_html_report_panel.h>
#include <schematic.h>
// A window name for the annotate dialog to retrieve is if not destroyed

View File

@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-133-g388db8e4)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "widgets/infobar.h"
#include "wx_html_report_panel.h"
#include "widgets/wx_html_report_panel.h"
#include "dialog_annotate_base.h"
@ -63,16 +63,12 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con
m_rbSortBy_X_Position = new wxRadioButton( sbSizer1->GetStaticBox(), ID_SORT_BY_X_POSITION, _("Sort symbols by &X position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
bSizerXpos->Add( m_rbSortBy_X_Position, 0, wxALIGN_CENTER_VERTICAL, 3 );
annotate_down_right_bitmap = new wxStaticBitmap( sbSizer1->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
bSizerXpos->Add( annotate_down_right_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
sbSizer1->Add( bSizerXpos, 0, wxEXPAND, 5 );
sbSizer1->Add( 0, 5, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerYpos;
bSizerYpos = new wxBoxSizer( wxHORIZONTAL );
@ -80,6 +76,8 @@ DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, con
bSizerYpos->Add( m_rbSortBy_Y_Position, 0, wxALIGN_CENTER_VERTICAL, 3 );
bSizerYpos->Add( 0, 0, 1, 0, 5 );
annotate_right_down_bitmap = new wxStaticBitmap( sbSizer1->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
bSizerYpos->Add( annotate_right_down_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );

View File

@ -36,7 +36,6 @@
<property name="center"></property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="event_handler">impl_virtual</property>
<property name="extra_style"></property>
@ -88,7 +87,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="duration">500</property>
<property name="enabled">1</property>
<property name="fg"></property>
@ -186,7 +184,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@ -251,7 +248,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@ -316,7 +312,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@ -382,7 +377,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@ -469,7 +463,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@ -536,7 +529,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@ -605,7 +597,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@ -682,7 +673,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@ -745,7 +735,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@ -842,7 +831,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@ -911,7 +899,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@ -980,7 +967,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@ -1049,7 +1035,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@ -1121,7 +1106,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
@ -1146,7 +1130,7 @@
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">WX_HTML_REPORT_PANEL; wx_html_report_panel.h; forward_declare</property>
<property name="subclass">WX_HTML_REPORT_PANEL; widgets/wx_html_report_panel.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
@ -1195,7 +1179,6 @@
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="drag_accept_files">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-133-g388db8e4)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020-2021 CERN
* Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2021-2022 KiCad Developers, see AUTHORS.txt for contributors.
*
* @author Wayne Stambaugh <stambaughw@gmail.com>
*
@ -35,7 +35,7 @@
#include <sch_sheet_path.h>
#include <schematic.h>
#include <template_fieldnames.h>
#include <wx_html_report_panel.h>
#include <widgets/wx_html_report_panel.h>
bool g_selectRefDes = false;
bool g_selectValue = false;

View File

@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "wx_html_report_panel.h"
#include "widgets/wx_html_report_panel.h"
#include "dialog_change_symbols_base.h"

View File

@ -1788,7 +1788,7 @@
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">WX_HTML_REPORT_PANEL; wx_html_report_panel.h; forward_declare</property>
<property name="subclass">WX_HTML_REPORT_PANEL; widgets/wx_html_report_panel.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!

View File

@ -39,7 +39,7 @@
#include <erc.h>
#include <id.h>
#include <confirm.h>
#include <dialogs/wx_html_report_box.h>
#include <widgets/wx_html_report_box.h>
#include <wx/ffile.h>
#include <wx/filedlg.h>
#include <wx/hyperlink.h>

View File

@ -1,12 +1,12 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialogs/wx_html_report_box.h"
#include "widgets/infobar.h"
#include "widgets/wx_html_report_box.h"
#include "dialog_erc_base.h"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="15" />
<FileVersion major="1" minor="16" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
@ -14,6 +14,7 @@
<property name="file">dialog_erc_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_ERC_base</property>
@ -25,6 +26,7 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@ -50,6 +52,7 @@
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Electrical Rules Checker</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
@ -409,7 +412,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxHW_SCROLLBAR_AUTO</property>
<property name="subclass">WX_HTML_REPORT_BOX; dialogs/wx_html_report_box.h; forward_declare</property>
<property name="subclass">WX_HTML_REPORT_BOX; widgets/wx_html_report_box.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
@ -1401,6 +1404,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -1547,6 +1551,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -1620,6 +1625,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -80,7 +80,7 @@ class DIALOG_ERC_BASE : public DIALOG_SHIM
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class
// Virtual event handlers, override them in your derived class
virtual void OnCloseErcDialog( wxCloseEvent& event ) { event.Skip(); }
virtual void OnLinkClicked( wxHtmlLinkEvent& event ) { event.Skip(); }
virtual void OnERCItemDClick( wxDataViewEvent& event ) { event.Skip(); }
@ -98,6 +98,7 @@ class DIALOG_ERC_BASE : public DIALOG_SHIM
public:
DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Electrical Rules Checker"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_ERC_BASE();
};

View File

@ -26,7 +26,7 @@
#include <bitmaps.h>
#include <common.h> // For ExpandEnvVarSubstitutions
#include <dialogs/wx_html_report_panel.h>
#include "widgets/wx_html_report_panel.h"
#include <dialog_plot_schematic.h>
#include <eeschema_settings.h>
#include <kiface_base.h>

View File

@ -5,7 +5,7 @@
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "wx_html_report_panel.h"
#include "widgets/wx_html_report_panel.h"
#include "dialog_plot_schematic_base.h"

View File

@ -30,7 +30,7 @@
#include <reporter.h>
#include <wildcards_and_files_ext.h>
#include <wx_filename.h>
#include <wx_html_report_panel.h>
#include "widgets/wx_html_report_panel.h"
#include <symbol_library.h>
#include <core/kicad_algo.h>

View File

@ -5,7 +5,7 @@
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "wx_html_report_panel.h"
#include "widgets/wx_html_report_panel.h"
#include "dialog_symbol_remap_base.h"

View File

@ -26,7 +26,7 @@
#include <dialog_update_from_pcb.h>
#include <sch_edit_frame.h>
#include <sch_editor_control.h>
#include <wx_html_report_panel.h>
#include "widgets/wx_html_report_panel.h"
// Saved dialog settings
DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB_SAVED_STATE

View File

@ -5,7 +5,7 @@
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "wx_html_report_panel.h"
#include "widgets/wx_html_report_panel.h"
#include "dialog_update_from_pcb_base.h"

View File

@ -37,7 +37,6 @@
#include <profile.h>
#include <project/project_file.h>
#include <project_rescue.h>
#include <wx_html_report_box.h>
#include <dialog_HTML_reporter_base.h>
#include <reporter.h>
#include <richio.h>
@ -68,6 +67,7 @@
#include <paths.h>
#include <wx_filename.h> // For ::ResolvePossibleSymlinks
#include <widgets/wx_progress_reporters.h>
#include <widgets/wx_html_report_box.h>
#if wxCHECK_VERSION( 3, 1, 7 )
#include "widgets/filedlg_hook_save_project.h"

View File

@ -237,18 +237,18 @@ std::shared_ptr<BUS_ALIAS> SCHEMATIC::GetBusAlias( const wxString& aLabel ) cons
}
std::vector<wxString> SCHEMATIC::GetNetClassAssignmentCandidates()
std::set<wxString> SCHEMATIC::GetNetClassAssignmentCandidates()
{
std::vector<wxString> names;
std::set<wxString> names;
for( const NET_MAP::value_type& pair: m_connectionGraph->GetNetMap() )
for( const auto& [ key, subgraphList ] : m_connectionGraph->GetNetMap() )
{
CONNECTION_SUBGRAPH* subgraph = pair.second[0];
CONNECTION_SUBGRAPH* firstSubgraph = subgraphList[0];
if( !subgraph->m_driver_connection->IsBus()
&& subgraph->GetDriverPriority() >= CONNECTION_SUBGRAPH::PRIORITY::PIN )
if( !firstSubgraph->m_driver_connection->IsBus()
&& firstSubgraph->GetDriverPriority() >= CONNECTION_SUBGRAPH::PRIORITY::PIN )
{
names.emplace_back( pair.first.Name );
names.insert( key.Name );
}
}

View File

@ -146,11 +146,11 @@ public:
std::shared_ptr<BUS_ALIAS> GetBusAlias( const wxString& aLabel ) const;
/**
* Return a list of name candidates for netclass assignment. The list will include both
* Return the set of netname candidates for netclass assignment. The list will include both
* composite names (buses) and atomic net names. Names are fetched from available labels,
* power pins, etc.
*/
std::vector<wxString> GetNetClassAssignmentCandidates();
std::set<wxString> GetNetClassAssignmentCandidates();
/**
* Resolves text vars that refer to other items.

View File

@ -470,7 +470,7 @@ TOOL_ACTION EE_ACTIONS::updateSymbol( "eeschema.InteractiveEdit.updateSymbol",
TOOL_ACTION EE_ACTIONS::assignNetclass( "eeschema.InteractiveEdit.assignNetclass",
AS_GLOBAL, 0, "",
_( "Assign Netclass..." ), _( "Assign a netclass to the net of the selected wire" ),
_( "Assign Netclass..." ), _( "Assign a netclass to nets matching a pattern" ),
BITMAPS::netlist);
TOOL_ACTION EE_ACTIONS::toggleDeMorgan( "eeschema.InteractiveEdit.toggleDeMorgan",

View File

@ -402,7 +402,7 @@ bool SCH_EDIT_TOOL::Init()
std::shared_ptr<SYMBOL_UNIT_MENU> symUnitMenu = std::make_shared<SYMBOL_UNIT_MENU>();
symUnitMenu->SetTool( this );
m_menu.AddSubMenu( symUnitMenu );
m_menu.RegisterSubMenu( symUnitMenu );
moveMenu.AddMenu( symUnitMenu.get(), E_C::SingleMultiUnitSymbol, 1 );
moveMenu.AddSeparator();
@ -445,7 +445,7 @@ bool SCH_EDIT_TOOL::Init()
std::shared_ptr<SYMBOL_UNIT_MENU> symUnitMenu2 = std::make_shared<SYMBOL_UNIT_MENU>();
symUnitMenu2->SetTool( drawingTools );
drawingTools->GetToolMenu().AddSubMenu( symUnitMenu2 );
drawingTools->GetToolMenu().RegisterSubMenu( symUnitMenu2 );
drawMenu.AddMenu( symUnitMenu2.get(), E_C::SingleMultiUnitSymbol, 1 );
drawMenu.AddItem( EE_ACTIONS::editWithLibEdit, E_C::SingleSymbolOrPower && E_C::Idle, 200 );
@ -482,7 +482,7 @@ bool SCH_EDIT_TOOL::Init()
std::shared_ptr<SYMBOL_UNIT_MENU> symUnitMenu3 = std::make_shared<SYMBOL_UNIT_MENU>();
symUnitMenu3->SetTool( m_selectionTool );
m_selectionTool->GetToolMenu().AddSubMenu( symUnitMenu3 );
m_selectionTool->GetToolMenu().RegisterSubMenu( symUnitMenu3 );
selToolMenu.AddMenu( symUnitMenu3.get(), E_C::SingleMultiUnitSymbol, 1 );
selToolMenu.AddItem( EE_ACTIONS::editWithLibEdit, E_C::SingleSymbolOrPower && E_C::Idle, 200 );

View File

@ -47,7 +47,6 @@
#include <sch_sheet.h>
#include <sch_sheet_pin.h>
#include <sch_view.h>
#include <pin_numbers.h>
#include <schematic.h>
#include <advanced_config.h>
#include <sim/sim_plot_frame.h>
@ -59,11 +58,9 @@
#include <tools/ee_selection.h>
#include <tools/ee_selection_tool.h>
#include <tools/sch_editor_control.h>
#include <tools/sch_navigate_tool.h>
#include <drawing_sheet/ds_proxy_undo_item.h>
#include <dialog_update_from_pcb.h>
#include <eda_list_dialog.h>
#include <wildcards_and_files_ext.h>
#include <wx_filename.h>
#include <sch_sheet_path.h>
@ -1116,8 +1113,10 @@ int SCH_EDITOR_CONTROL::AssignNetclass( const TOOL_EVENT& aEvent )
// TODO remove once real-time connectivity is a given
if( !ADVANCED_CFG::GetCfg().m_RealTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
{
// Ensure the netlist data is up to date:
m_frame->RecalculateConnections( NO_CLEANUP );
}
// Remove selection in favor of highlighting so the whole net is highlighted
selectionTool->ClearSelection();
@ -1165,7 +1164,8 @@ int SCH_EDITOR_CONTROL::AssignNetclass( const TOOL_EVENT& aEvent )
netNames.Add( conn->Name() );
}
DIALOG_ASSIGN_NETCLASS dlg( m_frame, netNames.front() );
DIALOG_ASSIGN_NETCLASS dlg( m_frame, netNames.front(),
m_frame->Schematic().GetNetClassAssignmentCandidates() );
dlg.ShowModal();
}
@ -2035,7 +2035,9 @@ int SCH_EDITOR_CONTROL::EditWithSymbolEditor( const TOOL_EVENT& aEvent )
blocking_win->Close( true );
if( aEvent.IsAction( &EE_ACTIONS::editWithLibEdit ) )
{
symbolEditor->LoadSymbolFromSchematic( symbol );
}
else if( aEvent.IsAction( &EE_ACTIONS::editLibSymbolWithLibEdit ) )
{
symbolEditor->LoadSymbol( symbol->GetLibId(), symbol->GetUnit(), symbol->GetConvert() );

View File

@ -179,6 +179,14 @@ bool SCH_LINE_WIRE_BUS_TOOL::Init()
{
EE_TOOL_BASE::Init();
std::shared_ptr<BUS_UNFOLD_MENU> busUnfoldMenu = std::make_shared<BUS_UNFOLD_MENU>();
busUnfoldMenu->SetTool( this );
m_menu.RegisterSubMenu( busUnfoldMenu );
std::shared_ptr<BUS_UNFOLD_MENU> selBusUnfoldMenu = std::make_shared<BUS_UNFOLD_MENU>();
selBusUnfoldMenu->SetTool( m_selectionTool );
m_selectionTool->GetToolMenu().RegisterSubMenu( selBusUnfoldMenu );
auto wireOrBusTool =
[this]( const SELECTION& aSel )
{
@ -230,9 +238,6 @@ bool SCH_LINE_WIRE_BUS_TOOL::Init()
ctxMenu.AddItem( EE_ACTIONS::finishBus, IsDrawingBus, 10 );
ctxMenu.AddItem( EE_ACTIONS::finishLine, IsDrawingLine, 10 );
std::shared_ptr<BUS_UNFOLD_MENU> busUnfoldMenu = std::make_shared<BUS_UNFOLD_MENU>();
busUnfoldMenu->SetTool( this );
m_menu.AddSubMenu( busUnfoldMenu );
ctxMenu.AddMenu( busUnfoldMenu.get(), EE_CONDITIONS::Idle, 10 );
ctxMenu.AddSeparator( 100 );
@ -252,9 +257,6 @@ bool SCH_LINE_WIRE_BUS_TOOL::Init()
//
CONDITIONAL_MENU& selToolMenu = m_selectionTool->GetToolMenu().GetMenu();
std::shared_ptr<BUS_UNFOLD_MENU> selBusUnfoldMenu = std::make_shared<BUS_UNFOLD_MENU>();
selBusUnfoldMenu->SetTool( m_selectionTool );
m_selectionTool->GetToolMenu().AddSubMenu( selBusUnfoldMenu );
selToolMenu.AddMenu( selBusUnfoldMenu.get(), busSelection && EE_CONDITIONS::Idle, 100 );
return true;

View File

@ -125,14 +125,12 @@ GERBVIEW_SELECTION_TOOL::~GERBVIEW_SELECTION_TOOL()
bool GERBVIEW_SELECTION_TOOL::Init()
{
auto selectMenu = std::make_shared<HIGHLIGHT_MENU>();
selectMenu->SetTool( this );
m_menu.AddSubMenu( selectMenu );
std::shared_ptr<HIGHLIGHT_MENU> highlightSubMenu = std::make_shared<HIGHLIGHT_MENU>();
highlightSubMenu->SetTool( this );
m_menu.RegisterSubMenu( highlightSubMenu );
auto& menu = m_menu.GetMenu();
menu.AddMenu( selectMenu.get() );
menu.AddSeparator( 1000 );
m_menu.GetMenu().AddMenu( highlightSubMenu.get() );
m_menu.GetMenu().AddSeparator( 1000 );
getEditFrame<GERBVIEW_FRAME>()->AddStandardSubMenus( m_menu );

View File

@ -27,13 +27,14 @@
#include <dialogs/dialog_assign_netclass_base.h>
class SCH_EDIT_FRAME;
class EDA_BASE_FRAME;
class DIALOG_ASSIGN_NETCLASS : public DIALOG_ASSIGN_NETCLASS_BASE
{
public:
DIALOG_ASSIGN_NETCLASS( SCH_EDIT_FRAME* aParent, const wxString aNetName );
DIALOG_ASSIGN_NETCLASS( EDA_BASE_FRAME* aParent, const wxString aNetName,
const std::set<wxString> aCandidateNetNames );
~DIALOG_ASSIGN_NETCLASS() override {}
private:
@ -42,8 +43,10 @@ private:
bool TransferDataFromWindow() override;
private:
SCH_EDIT_FRAME* m_frame;
wxString m_lastPattern;
EDA_BASE_FRAME* m_frame;
std::set<wxString> m_netCandidates;
wxString m_lastPattern;
};
#endif //DIALOG_ASSIGN_NETCLASS_H

View File

@ -37,7 +37,7 @@ class PANEL_SETUP_NETCLASSES : public PANEL_SETUP_NETCLASSES_BASE
public:
PANEL_SETUP_NETCLASSES( PAGED_DIALOG* aParent, EDA_DRAW_FRAME* aFrame,
std::shared_ptr<NET_SETTINGS> aSettings,
const std::vector<wxString>& aNetNames, bool isEEschema );
const std::set<wxString>& aNetNames, bool isEEschema );
~PANEL_SETUP_NETCLASSES( ) override;
bool TransferDataToWindow() override;
@ -72,7 +72,7 @@ private:
PAGED_DIALOG* m_parent;
bool m_isEEschema;
std::shared_ptr<NET_SETTINGS> m_netSettings;
std::vector<wxString> m_netNames;
std::set<wxString> m_netNames;
int* m_originalColWidths;
bool m_netclassesDirty; // The netclass drop-down menus need rebuilding

View File

@ -124,7 +124,8 @@ private:
public:
ENTRY( const TOOL_ACTION* aAction, SELECTION_CONDITION aCondition, int aOrder,
bool aCheckmark ) :
m_type( ACTION ), m_icon( static_cast<BITMAPS>( 0 ) ),
m_type( ACTION ),
m_icon( static_cast<BITMAPS>( 0 ) ),
m_condition( aCondition ),
m_order( aOrder ),
m_isCheckmarkEntry( aCheckmark )
@ -133,7 +134,8 @@ private:
}
ENTRY( ACTION_MENU* aMenu, SELECTION_CONDITION aCondition, int aOrder ) :
m_type( MENU ), m_icon( static_cast<BITMAPS>( 0 ) ),
m_type( MENU ),
m_icon( static_cast<BITMAPS>( 0 ) ),
m_condition( aCondition ),
m_order( aOrder ),
m_isCheckmarkEntry( false )
@ -143,7 +145,8 @@ private:
ENTRY( const wxMenuItem& aItem, BITMAPS aBitmap,
SELECTION_CONDITION aCondition, int aOrder, bool aCheckmark ) :
m_type( WXITEM ), m_icon( aBitmap ),
m_type( WXITEM ),
m_icon( aBitmap ),
m_condition( aCondition ),
m_order( aOrder ),
m_isCheckmarkEntry( aCheckmark )
@ -154,7 +157,8 @@ private:
// Separator
ENTRY( SELECTION_CONDITION aCondition, int aOrder ) :
m_type( SEPARATOR ), m_icon( static_cast<BITMAPS>( 0 ) ),
m_type( SEPARATOR ),
m_icon( static_cast<BITMAPS>( 0 ) ),
m_data(),
m_condition( aCondition ),
m_order( aOrder ),

View File

@ -72,7 +72,7 @@ public:
*
* @param aSubMenu: a sub menu to add
*/
void AddSubMenu( std::shared_ptr<ACTION_MENU> aSubMenu );
void RegisterSubMenu( std::shared_ptr<ACTION_MENU> aSubMenu );
/**
* @return the list of submenus from this menu

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="15" />
<FileVersion major="1" minor="16" />
<object class="Project" expanded="1">
<property name="class_decoration">; </property>
<property name="code_generation">C++</property>
@ -14,6 +14,7 @@
<property name="file">dialog_pcm_progress_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_pcm_progress_base</property>
@ -25,6 +26,7 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@ -50,6 +52,7 @@
<property name="subclass">; ; forward_declare</property>
<property name="title">Applying Package Changes</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
@ -449,7 +452,7 @@
<property name="show">1</property>
<property name="size">-1,-1</property>
<property name="style">wxHW_SCROLLBAR_AUTO</property>
<property name="subclass">WX_HTML_REPORT_BOX; dialogs/wx_html_report_box.h; Not forward_declare</property>
<property name="subclass">WX_HTML_REPORT_BOX; widgets/wx_html_report_box.h; </property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
@ -491,6 +494,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -574,6 +578,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -10,7 +10,7 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include "dialogs/wx_html_report_box.h"
#include "widgets/wx_html_report_box.h"
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
@ -22,10 +22,10 @@
#include <wx/statbox.h>
#include <wx/panel.h>
#include <wx/html/htmlwin.h>
#include <wx/button.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
@ -48,7 +48,7 @@ class DIALOG_PCM_PROGRESS_BASE : public wxDialog
wxButton* m_buttonCancel;
wxButton* m_buttonClose;
// Virtual event handlers, overide them in your derived class
// Virtual event handlers, override them in your derived class
virtual void OnCancelClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCloseClicked( wxCommandEvent& event ) { event.Skip(); }
@ -56,6 +56,7 @@ class DIALOG_PCM_PROGRESS_BASE : public wxDialog
public:
DIALOG_PCM_PROGRESS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Applying Package Changes"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,500 ), long style = wxCAPTION );
~DIALOG_PCM_PROGRESS_BASE();
};

View File

@ -1421,14 +1421,14 @@ FOOTPRINT* BOARD::FindFootprintByPath( const KIID_PATH& aPath ) const
}
std::vector<wxString> BOARD::GetNetClassAssignmentCandidates() const
std::set<wxString> BOARD::GetNetClassAssignmentCandidates() const
{
std::vector<wxString> names;
std::set<wxString> names;
for( const NETINFO_ITEM* net : m_NetInfo )
{
if( !net->GetNetname().IsEmpty() )
names.emplace_back( net->GetNetname() );
names.insert( net->GetNetname() );
}
return names;

View File

@ -857,12 +857,9 @@ public:
FOOTPRINT* FindFootprintByPath( const KIID_PATH& aPath ) const;
/**
* Return a list of name candidates for netclass assignment.
*
* Tokens may appear more than once if they were harvested from hierarchical nets
* (ie: /CLK, /sheet1/CLK).
* Return the set of netname candidates for netclass assignment.
*/
std::vector<wxString> GetNetClassAssignmentCandidates() const;
std::set<wxString> GetNetClassAssignmentCandidates() const;
/**
* Copy NETCLASS info to each NET, based on NET membership in a NETCLASS.

View File

@ -501,7 +501,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
connectivity->PropagateNets( this, PROPAGATE_MODE::RESOLVE_CONFLICTS );
connectivity->RecalculateRatsnest( this );
connectivity->ClearDynamicRatsnest();
connectivity->ClearLocalRatsnest();
}
if( solderMaskDirty )

View File

@ -302,9 +302,9 @@ void CONNECTIVITY_DATA::FindIsolatedCopperIslands( std::vector<CN_ZONE_ISOLATED_
}
void CONNECTIVITY_DATA::ComputeDynamicRatsnest( const std::vector<BOARD_ITEM*>& aItems,
const CONNECTIVITY_DATA* aDynamicData,
VECTOR2I aInternalOffset )
void CONNECTIVITY_DATA::ComputeLocalRatsnest( const std::vector<BOARD_ITEM*>& aItems,
const CONNECTIVITY_DATA* aDynamicData,
VECTOR2I aInternalOffset )
{
if( !aDynamicData )
return;
@ -352,17 +352,17 @@ void CONNECTIVITY_DATA::ComputeDynamicRatsnest( const std::vector<BOARD_ITEM*>&
}
void CONNECTIVITY_DATA::ClearDynamicRatsnest()
void CONNECTIVITY_DATA::ClearLocalRatsnest()
{
m_connAlgo->ForEachAnchor( []( CN_ANCHOR& anchor )
{
anchor.SetNoLine( false );
} );
HideDynamicRatsnest();
HideLocalRatsnest();
}
void CONNECTIVITY_DATA::HideDynamicRatsnest()
void CONNECTIVITY_DATA::HideLocalRatsnest()
{
m_dynamicRatsnest.clear();
}

View File

@ -235,27 +235,26 @@ public:
bool TestTrackEndpointDangling( PCB_TRACK* aTrack, VECTOR2I* aPos = nullptr );
/**
* Function ClearDynamicRatsnest()
* Erases the temporary dynamic ratsnest (i.e. the ratsnest lines that
* pcbnew displays when moving an item/set of items)
* Function ClearLocalRatsnest()
* Erases the temporary, selection-based ratsnest (i.e. the ratsnest lines that pcbnew
* displays when moving an item/set of items).
*/
void ClearDynamicRatsnest();
void ClearLocalRatsnest();
/**
* Hides the temporary dynamic ratsnest lines.
* Hides the temporary, selection-based ratsnest lines.
*/
void HideDynamicRatsnest();
void HideLocalRatsnest();
/**
* Function ComputeDynamicRatsnest()
* Calculates the temporary dynamic ratsnest (i.e. the ratsnest lines that)
* for the set of items aItems.
* Function ComputeLocalRatsnest()
* Calculates the temporary (usually selection-based) ratsnest for the set of \a aItems.
*/
void ComputeDynamicRatsnest( const std::vector<BOARD_ITEM*>& aItems,
const CONNECTIVITY_DATA* aDynamicData,
VECTOR2I aInternalOffset = { 0, 0 } );
void ComputeLocalRatsnest( const std::vector<BOARD_ITEM*>& aItems,
const CONNECTIVITY_DATA* aDynamicData,
VECTOR2I aInternalOffset = { 0, 0 } );
const std::vector<RN_DYNAMIC_LINE>& GetDynamicRatsnest() const { return m_dynamicRatsnest; }
const std::vector<RN_DYNAMIC_LINE>& GetLocalRatsnest() const { return m_dynamicRatsnest; }
/**
* Function GetConnectedItems()

View File

@ -35,6 +35,7 @@
#include <pcbnew_settings.h>
#include <refdes_utils.h>
#include <tool/grid_menu.h>
#include <widgets/wx_html_report_panel.h>
#include <wx/valtext.h>

View File

@ -34,8 +34,6 @@
#include <pcb_base_frame.h>
#include <pcb_edit_frame.h>
#include <project.h>
#include <wx_html_report_panel.h>
#include <frame_type.h>
#include <tool/actions.h>
#include <tool/tool_manager.h>

View File

@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "wx_html_report_panel.h"
#include "widgets/wx_html_report_panel.h"
#include "dialog_board_reannotate_base.h"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="15" />
<FileVersion major="1" minor="16" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
@ -52,6 +52,7 @@
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Geographical Reannotation</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
@ -2873,7 +2874,7 @@
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">WX_HTML_REPORT_PANEL; wx_html_report_panel.h; forward_declare</property>
<property name="subclass">WX_HTML_REPORT_PANEL; widgets/wx_html_report_panel.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -93,7 +93,7 @@ class DIALOG_BOARD_REANNOTATE_BASE : public DIALOG_SHIM
wxButton* m_sdbSizerOK;
wxButton* m_sdbSizerCancel;
// Virtual event handlers, overide them in your derived class
// Virtual event handlers, override them in your derived class
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
virtual void FilterFrontPrefix( wxCommandEvent& event ) { event.Skip(); }
virtual void FilterBackPrefix( wxCommandEvent& event ) { event.Skip(); }
@ -104,6 +104,7 @@ class DIALOG_BOARD_REANNOTATE_BASE : public DIALOG_SHIM
public:
DIALOG_BOARD_REANNOTATE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Geographical Reannotation"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_BOARD_REANNOTATE_BASE();
};

View File

@ -30,7 +30,6 @@
#include <drc/drc_item.h>
#include <tools/zone_filler_tool.h>
#include <reporter.h>
#include <dialogs/wx_html_report_panel_base.h>
DIALOG_CLEANUP_TRACKS_AND_VIAS::DIALOG_CLEANUP_TRACKS_AND_VIAS( PCB_EDIT_FRAME* aParentFrame ) :
DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE( aParentFrame ),

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -24,7 +24,7 @@
#include <dialog_constraints_reporter.h>
#include <pcb_edit_frame.h>
#include <tool/tool_manager.h>
#include <wx_html_report_box.h>
#include <widgets/wx_html_report_box.h>
#include <tools/pcb_actions.h>
#include <wx/wxhtml.h>

View File

@ -87,10 +87,6 @@ private:
void updateShowNetsFilter();
wxString getUnescapedNetName( const NETINFO_ITEM* net );
void sortNetsIfRequired();
wxArrayString getSortedNetNamesList();
wxArrayString applyShowFilter( const wxArrayString& sortedNetNames );
wxArrayString applyHideFilterIfRequired( const wxArrayString& netNames );
bool isAutoGenerated( const wxString& netName );
void updateCurrentNetSelection();
void updateInfoBar();
void storePersistentNetSortConfigurations();
@ -757,9 +753,7 @@ void DIALOG_COPPER_ZONE::updateShowNetsFilter()
wxString netNameShowFilter = m_ShowNetNameFilter->GetValue();
if( netNameShowFilter.Len() == 0 )
{
netNameShowFilter = wxT( "*" );
}
wxStringTokenizer showFilters( netNameShowFilter.Lower(), wxT( "," ) );
@ -784,26 +778,37 @@ wxArrayString DIALOG_COPPER_ZONE::buildListOfNetsToDisplay()
{
sortNetsIfRequired();
const wxArrayString sortedNetNames = getSortedNetNamesList();
wxArrayString netNames;
const wxArrayString netsAfterShowFilter = applyShowFilter( sortedNetNames );
for( NETINFO_ITEM* net : m_netInfoItemList )
{
if( m_hideAutoGeneratedNets && net->HasAutoGeneratedNetname() )
continue;
wxArrayString filteredNetNames = applyHideFilterIfRequired( netsAfterShowFilter );
const wxString& netName = getUnescapedNetName( net );
return filteredNetNames;
for( const NET_FILTER& filter : m_showNetsFilter )
{
if( filter->Find( netName.Lower() ) )
{
netNames.Add( netName );
break;
}
}
}
netNames.Insert( wxT( "<no net>" ), INVALID_NET_CODE );
return netNames;
}
void DIALOG_COPPER_ZONE::sortNetsIfRequired()
{
if( m_netSortingByPadCount )
{
sortNetsByPadCount( m_netInfoItemList, m_maxNetCode );
}
else
{
sort( m_netInfoItemList.begin(), m_netInfoItemList.end(), sortNetsByNames );
}
}
@ -829,70 +834,6 @@ void DIALOG_COPPER_ZONE::sortNetsByPadCount( std::vector<NETINFO_ITEM*>& nets,
}
wxArrayString DIALOG_COPPER_ZONE::getSortedNetNamesList()
{
wxArrayString sortedNetNames;
for( NETINFO_ITEM* net : m_netInfoItemList )
{
const wxString& netName = getUnescapedNetName( net );
sortedNetNames.Add( netName );
}
return sortedNetNames;
}
wxArrayString DIALOG_COPPER_ZONE::applyShowFilter( const wxArrayString& netNames )
{
wxArrayString netsAfterShowFilter;
for( const wxString& netName : netNames )
{
for( const NET_FILTER& filter : m_showNetsFilter )
{
if( filter->Find( netName.Lower() ) )
{
netsAfterShowFilter.Add( netName );
}
}
}
return netsAfterShowFilter;
}
wxArrayString DIALOG_COPPER_ZONE::applyHideFilterIfRequired( const wxArrayString& netNames )
{
wxArrayString filteredNetNames;
if( m_hideAutoGeneratedNets )
{
for( const wxString& netName : netNames )
{
if( !isAutoGenerated( netName ) )
{
filteredNetNames.Add( netName );
}
}
}
else
{
filteredNetNames = netNames;
}
filteredNetNames.Insert( wxT( "<no net>" ), INVALID_NET_CODE );
return filteredNetNames;
}
bool DIALOG_COPPER_ZONE::isAutoGenerated( const wxString& netName )
{
return netName.StartsWith( wxT( "Net-(" ) ) || netName.StartsWith( wxT( "unconnected-(" ) );
}
void DIALOG_COPPER_ZONE::displayNetsList( const wxArrayString& netNamesList, int selectIndex )
{
m_ListNetNameSelection->Clear();

View File

@ -44,7 +44,7 @@
#include <widgets/appearance_controls.h>
#include <widgets/ui_common.h>
#include <widgets/progress_reporter_base.h>
#include <dialogs/wx_html_report_box.h>
#include <widgets/wx_html_report_box.h>
#include <dialogs/panel_setup_rules_base.h>
#include <tools/drc_tool.h>
#include <tools/zone_filler_tool.h>

View File

@ -5,7 +5,7 @@
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialogs/wx_html_report_box.h"
#include "widgets/wx_html_report_box.h"
#include "dialog_drc_base.h"

View File

@ -569,7 +569,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxHW_SCROLLBAR_AUTO</property>
<property name="subclass">WX_HTML_REPORT_BOX; dialogs/wx_html_report_box.h; forward_declare</property>
<property name="subclass">WX_HTML_REPORT_BOX; widgets/wx_html_report_box.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>

View File

@ -37,7 +37,7 @@
#include <pcb_group.h>
#include <pcbnew_settings.h>
#include <project.h>
#include <wx_html_report_panel.h>
#include <widgets/wx_html_report_panel.h>
#define ID_MATCH_FP_ALL 4200

View File

@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "wx_html_report_panel.h"
#include "widgets/wx_html_report_panel.h"
#include "dialog_exchange_footprints_base.h"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="15" />
<FileVersion major="1" minor="16" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
@ -14,6 +14,7 @@
<property name="file">dialog_exchange_footprints_base</property>
<property name="first_id">4200</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_exchange_footprints_base</property>
@ -25,6 +26,7 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@ -50,6 +52,7 @@
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Update Footprints from Library</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
@ -642,6 +645,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -918,6 +922,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -1365,7 +1370,7 @@
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">WX_HTML_REPORT_PANEL; wx_html_report_panel.h</property>
<property name="subclass">WX_HTML_REPORT_PANEL; widgets/wx_html_report_panel.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -70,7 +70,7 @@ class DIALOG_EXCHANGE_FOOTPRINTS_BASE : public DIALOG_SHIM
wxButton* m_sdbSizerOK;
wxButton* m_sdbSizerCancel;
// Virtual event handlers, overide them in your derived class
// Virtual event handlers, override them in your derived class
virtual void updateMatchModeRadioButtons( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void OnMatchAllClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void OnMatchSelectedClicked( wxCommandEvent& event ) { event.Skip(); }
@ -84,6 +84,7 @@ class DIALOG_EXCHANGE_FOOTPRINTS_BASE : public DIALOG_SHIM
public:
DIALOG_EXCHANGE_FOOTPRINTS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Update Footprints from Library"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_EXCHANGE_FOOTPRINTS_BASE();
};

View File

@ -35,9 +35,9 @@
#include <locale_io.h>
#include <board.h>
#include <dialog_export_svg_base.h>
#include <wx_html_report_panel.h>
#include <bitmaps.h>
#include <widgets/unit_binder.h>
#include <widgets/wx_html_report_panel.h>
#include <plotters/plotters_pslike.h>
#include <wx/dirdlg.h>
#include <pgm_base.h>

View File

@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "wx_html_report_panel.h"
#include "widgets/wx_html_report_panel.h"
#include "dialog_export_svg_base.h"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="15" />
<FileVersion major="1" minor="16" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
@ -14,6 +14,7 @@
<property name="file">dialog_export_svg_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_export_svg</property>
@ -25,6 +26,7 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@ -50,6 +52,7 @@
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Export SVG File</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
@ -205,6 +208,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -979,7 +983,7 @@
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">WX_HTML_REPORT_PANEL; wx_html_report_panel.h</property>
<property name="subclass">WX_HTML_REPORT_PANEL; widgets/wx_html_report_panel.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -60,7 +60,7 @@ class DIALOG_EXPORT_SVG_BASE : public DIALOG_SHIM
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class
// Virtual event handlers, override them in your derived class
virtual void OnOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void onPagePerLayerClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void OnButtonPlot( wxCommandEvent& event ) { event.Skip(); }
@ -69,6 +69,7 @@ class DIALOG_EXPORT_SVG_BASE : public DIALOG_SHIM
public:
DIALOG_EXPORT_SVG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Export SVG File"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_EXPORT_SVG_BASE();
};

View File

@ -5,7 +5,7 @@
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "wx_html_report_panel.h"
#include "widgets/wx_html_report_panel.h"
#include "dialog_gen_footprint_position_file_base.h"

View File

@ -35,10 +35,8 @@
#include <netlist_reader/pcb_netlist.h>
#include <netlist_reader/board_netlist_updater.h>
#include <project/project_file.h> // LAST_PATH_TYPE
#include <dialog_netlist.h>
#include <wx_html_report_panel.h>
#include <widgets/wx_html_report_panel.h>
#include <wx/filedlg.h>

View File

@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "wx_html_report_panel.h"
#include "widgets/wx_html_report_panel.h"
#include "dialog_netlist_base.h"

View File

@ -617,7 +617,7 @@
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">WX_HTML_REPORT_PANEL; wx_html_report_panel.h</property>
<property name="subclass">WX_HTML_REPORT_PANEL; widgets/wx_html_report_panel.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!

View File

@ -42,7 +42,7 @@
#include <board_design_settings.h>
#include <dialog_plot.h>
#include <dialog_gendrill.h>
#include <wx_html_report_panel.h>
#include <widgets/wx_html_report_panel.h>
#include <tool/tool_manager.h>
#include <tools/zone_filler_tool.h>
#include <tools/drc_tool.h>

View File

@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "wx_html_report_panel.h"
#include "widgets/wx_html_report_panel.h"
#include "dialog_plot_base.h"

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="15" />
<FileVersion major="1" minor="16" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
@ -14,6 +14,7 @@
<property name="file">dialog_plot_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">Dialog_Plot_base</property>
@ -25,6 +26,7 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">1</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@ -50,6 +52,7 @@
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Plot</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
@ -343,6 +346,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -3709,7 +3713,7 @@
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="subclass">WX_HTML_REPORT_PANEL; wx_html_report_panel.h</property>
<property name="subclass">WX_HTML_REPORT_PANEL; widgets/wx_html_report_panel.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
@ -3741,6 +3745,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -131,7 +131,7 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
wxButton* m_sdbSizer1Cancel;
wxMenu* m_popMenu;
// Virtual event handlers, overide them in your derived class
// Virtual event handlers, override them in your derived class
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
virtual void OnRightClick( wxMouseEvent& event ) { event.Skip(); }
virtual void SetPlotFormat( wxCommandEvent& event ) { event.Skip(); }
@ -149,6 +149,7 @@ class DIALOG_PLOT_BASE : public DIALOG_SHIM
public:
DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PLOT_BASE();
void DIALOG_PLOT_BASEOnContextMenu( wxMouseEvent &event )

View File

@ -25,7 +25,7 @@
#include <pcbnew_settings.h>
#include <dialog_update_pcb.h>
#include <ratsnest/ratsnest_data.h>
#include <wx_html_report_panel.h>
#include "widgets/wx_html_report_panel.h"
#include <netlist_reader/pcb_netlist.h>
#include <netlist_reader/board_netlist_updater.h>
#include <tool/tool_manager.h>

View File

@ -5,7 +5,7 @@
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "wx_html_report_panel.h"
#include "widgets/wx_html_report_panel.h"
#include "dialog_update_pcb_base.h"

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2020-2022 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -32,7 +32,7 @@
#include <string_utils.h>
#include <tool/tool_manager.h>
#include <panel_setup_rules.h>
#include <wx_html_report_box.h>
#include <widgets/wx_html_report_box.h>
#include <wx/treebook.h>
#include <dialogs/html_message_box.h>
#include <scintilla_tricks.h>

View File

@ -1,11 +1,11 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "wx_html_report_box.h"
#include "widgets/wx_html_report_box.h"
#include "panel_setup_rules_base.h"
@ -48,6 +48,7 @@ PANEL_SETUP_RULES_BASE::PANEL_SETUP_RULES_BASE( wxWindow* parent, wxWindowID id,
m_textEditor->SetViewWhiteSpace( false );
m_textEditor->SetMarginWidth( 2, 0 );
m_textEditor->SetIndentationGuides( true );
m_textEditor->SetReadOnly( false );
m_textEditor->SetMarginWidth( 1, 0 );
m_textEditor->SetMarginType( 0, wxSTC_MARGIN_NUMBER );
m_textEditor->SetMarginWidth( 0, m_textEditor->TextWidth( wxSTC_STYLE_LINENUMBER, wxT("_99999") ) );

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="15" />
<FileVersion major="1" minor="16" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
@ -14,6 +14,7 @@
<property name="file">panel_setup_rules_base</property>
<property name="first_id">2240</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">PanelSetupRules</property>
@ -25,6 +26,7 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Panel" expanded="1">
@ -46,6 +48,7 @@
<property name="size">-1,-1</property>
<property name="subclass">; forward_declare</property>
<property name="tooltip"></property>
<property name="two_step_creation">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property>
@ -268,6 +271,7 @@
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="read_only">0</property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
@ -307,6 +311,7 @@
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="auth_needed">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
@ -417,7 +422,7 @@
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxHW_SCROLLBAR_AUTO</property>
<property name="subclass">WX_HTML_REPORT_BOX; wx_html_report_box.h; forward_declare</property>
<property name="subclass">WX_HTML_REPORT_BOX; widgets/wx_html_report_box.h; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -49,7 +49,7 @@ class PANEL_SETUP_RULES_BASE : public wxPanel
wxBitmapButton* m_compileButton;
WX_HTML_REPORT_BOX* m_errorsReport;
// Virtual event handlers, overide them in your derived class
// Virtual event handlers, override them in your derived class
virtual void OnSyntaxHelp( wxHyperlinkEvent& event ) { event.Skip(); }
virtual void OnContextMenu( wxMouseEvent& event ) { event.Skip(); }
virtual void OnCompile( wxCommandEvent& event ) { event.Skip(); }
@ -59,6 +59,7 @@ class PANEL_SETUP_RULES_BASE : public wxPanel
public:
PANEL_SETUP_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~PANEL_SETUP_RULES_BASE();
};

View File

@ -38,7 +38,7 @@
#include <footprint.h>
#include <wildcards_and_files_ext.h>
#include <kiface_base.h>
#include <wx_html_report_panel.h>
#include "widgets/wx_html_report_panel.h"
#include <dialog_gen_footprint_position_file_base.h>
#include <export_footprints_placefile.h>
#include "gerber_placefile_writer.h"

View File

@ -123,6 +123,15 @@ public:
*/
const wxString& GetShortNetname() const { return m_shortNetname; }
/**
* @return true if the net was not labelled by the user.
*/
bool HasAutoGeneratedNetname()
{
return m_shortNetname.StartsWith( wxT( "Net-(" ) )
|| m_shortNetname.StartsWith( wxT( "unconnected-(" ) );
}
/**
* Set the long netname to \a aNetName, and the short netname to the last token in
* the long netname's path.

View File

@ -1,13 +1,10 @@
/**
* @file pcbnew/netlist.cpp
*/
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 1992-2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2013-2016 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2016 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 1992-2022 KiCad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -97,11 +94,9 @@ void PCB_EDIT_FRAME::OnNetlistChanged( BOARD_NETLIST_UPDATER& aUpdater, bool* aR
for( auto track : board->Tracks() )
GetCanvas()->GetView()->Update( track );
std::vector<FOOTPRINT*> newFootprints = aUpdater.GetAddedFootprints();
// Spread new footprints.
VECTOR2I areaPosition = GetCanvas()->GetViewControls()->GetCursorPosition();
BOX2I bbox = board->GetBoundingBox();
std::vector<FOOTPRINT*> newFootprints = aUpdater.GetAddedFootprints();
VECTOR2I areaPosition = GetCanvas()->GetViewControls()->GetCursorPosition();
GetToolManager()->RunAction( PCB_ACTIONS::selectionClear, true );

View File

@ -791,8 +791,8 @@ void PCB_EDIT_FRAME::setupUIConditions()
return false;
};
mgr->SetConditions( PCB_ACTIONS::showNet, ENABLE( haveNetCond ) );
mgr->SetConditions( PCB_ACTIONS::hideNet, ENABLE( haveNetCond ) );
mgr->SetConditions( PCB_ACTIONS::showNetInRatsnest, ENABLE( haveNetCond ) );
mgr->SetConditions( PCB_ACTIONS::hideNetInRatsnest, ENABLE( haveNetCond ) );
mgr->SetConditions( PCB_ACTIONS::highlightNet, ENABLE( SELECTION_CONDITIONS::ShowAlways ) );
mgr->SetConditions( PCB_ACTIONS::highlightNetSelection, ENABLE( SELECTION_CONDITIONS::ShowAlways ) );

View File

@ -109,7 +109,7 @@ void RATSNEST_VIEW_ITEM::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const
const bool curved_ratsnest = cfg->m_Display.m_DisplayRatsnestLinesCurved;
// Draw the "dynamic" ratsnest (i.e. for objects that may be currently being moved)
for( const RN_DYNAMIC_LINE& l : m_data->GetDynamicRatsnest() )
for( const RN_DYNAMIC_LINE& l : m_data->GetLocalRatsnest() )
{
if( hiddenNets.count( l.netCode ) )
continue;

View File

@ -441,11 +441,11 @@ bool ROUTER_TOOL::Init()
m_trackViaMenu = std::make_shared<TRACK_WIDTH_MENU>( *frame );
m_trackViaMenu->SetTool( this );
m_menu.AddSubMenu( m_trackViaMenu );
m_menu.RegisterSubMenu( m_trackViaMenu );
m_diffPairMenu = std::make_shared<DIFF_PAIR_MENU>( *frame );
m_diffPairMenu->SetTool( this );
m_menu.AddSubMenu( m_diffPairMenu );
m_menu.RegisterSubMenu( m_diffPairMenu );
auto haveHighlight =
[&]( const SELECTION& sel )
@ -2030,7 +2030,7 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
// Update ratsnest
dynamicData->Move( offset - lastOffset );
lastOffset = offset;
connectivityData->ComputeDynamicRatsnest( dynamicItems, dynamicData.get(), offset );
connectivityData->ComputeLocalRatsnest( dynamicItems, dynamicData.get(), offset );
}
}
else if( hasMouseMoved && ( evt->IsMouseUp( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) ) )
@ -2079,7 +2079,7 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
view()->ClearPreview();
view()->ShowPreview( false );
connectivityData->ClearDynamicRatsnest();
connectivityData->ClearLocalRatsnest();
}
if( m_router->RoutingInProgress() )

View File

@ -30,6 +30,7 @@
#include <advanced_config.h>
#include "board_editor_control.h"
#include <bitmaps.h>
#include <pcb_painter.h>
#include <board.h>
#include <board_commit.h>
#include <board_design_settings.h>
@ -43,6 +44,7 @@
#include <confirm.h>
#include <dialogs/dialog_page_settings.h>
#include <dialogs/dialog_update_pcb.h>
#include <dialogs/dialog_assign_netclass.h>
#include <kiface_base.h>
#include <kiway.h>
#include <netlist_reader/pcb_netlist.h>
@ -199,15 +201,15 @@ bool BOARD_EDITOR_CONTROL::Init()
if( selTool )
{
auto& toolMenu = selTool->GetToolMenu();
auto& menu = toolMenu.GetMenu();
TOOL_MENU& toolMenu = selTool->GetToolMenu();
CONDITIONAL_MENU& menu = toolMenu.GetMenu();
// Add "Get and Place Footprint" when Selection tool is in an inactive state
menu.AddItem( PCB_ACTIONS::getAndPlace, inactiveStateCondition );
menu.AddSeparator();
toolMenu.AddSubMenu( zoneMenu );
toolMenu.AddSubMenu( lockMenu );
toolMenu.RegisterSubMenu( zoneMenu );
toolMenu.RegisterSubMenu( lockMenu );
menu.AddMenu( lockMenu.get(), SELECTION_CONDITIONS::NotEmpty, 100 );
@ -218,10 +220,10 @@ bool BOARD_EDITOR_CONTROL::Init()
if( drawingTool )
{
auto& toolMenu = drawingTool->GetToolMenu();
auto& menu = toolMenu.GetMenu();
TOOL_MENU& toolMenu = drawingTool->GetToolMenu();
CONDITIONAL_MENU& menu = toolMenu.GetMenu();
toolMenu.AddSubMenu( zoneMenu );
toolMenu.RegisterSubMenu( zoneMenu );
// Functor to say if the PCB_EDIT_FRAME is in a given mode
// Capture the tool pointer and tool mode by value
@ -1446,6 +1448,57 @@ void BOARD_EDITOR_CONTROL::doCrossProbePcbToSch( const TOOL_EVENT& aEvent, bool
}
int BOARD_EDITOR_CONTROL::AssignNetclass( const TOOL_EVENT& aEvent )
{
PCB_SELECTION_TOOL* selectionTool = m_toolMgr->GetTool<PCB_SELECTION_TOOL>();
const PCB_SELECTION& selection = selectionTool->RequestSelection(
[]( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector, PCB_SELECTION_TOOL* sTool )
{
// Iterate from the back so we don't have to worry about removals.
for( int i = aCollector.GetCount() - 1; i >= 0; --i )
{
if( !dynamic_cast<BOARD_CONNECTED_ITEM*>( aCollector[ i ] ) )
aCollector.Remove( aCollector[ i ] );
}
},
true /* prompt user regarding locked items */ );
intptr_t netCode = -1;
wxString netName;
for( EDA_ITEM* item : selection )
{
NETINFO_ITEM* net = static_cast<BOARD_CONNECTED_ITEM*>( item )->GetNet();
if( !net->HasAutoGeneratedNetname() )
{
netCode = net->GetNetCode();
netName = net->GetNetname();
break;
}
}
if( netName.IsEmpty() )
{
m_frame->ShowInfoBarError( _( "Selection contains no items with labelled nets." ) );
return 0;
}
// Remove selection in favor of highlighting so the whole net is highlighted
selectionTool->ClearSelection();
m_toolMgr->RunAction( PCB_ACTIONS::highlightNet, true, (void*) netCode );
wxSafeYield();
DIALOG_ASSIGN_NETCLASS dlg( m_frame, netName, board()->GetNetClassAssignmentCandidates() );
dlg.ShowModal();
m_toolMgr->RunAction( PCB_ACTIONS::clearHighlight, true );
return 0;
}
int BOARD_EDITOR_CONTROL::EditFpInFpEditor( const TOOL_EVENT& aEvent )
{
PCB_SELECTION_TOOL* selTool = m_toolMgr->GetTool<PCB_SELECTION_TOOL>();
@ -1572,6 +1625,8 @@ void BOARD_EDITOR_CONTROL::setTransitions()
Go( &BOARD_EDITOR_CONTROL::LockSelected, PCB_ACTIONS::lock.MakeEvent() );
Go( &BOARD_EDITOR_CONTROL::UnlockSelected, PCB_ACTIONS::unlock.MakeEvent() );
Go( &BOARD_EDITOR_CONTROL::AssignNetclass, PCB_ACTIONS::assignNetClass.MakeEvent() );
Go( &BOARD_EDITOR_CONTROL::UpdatePCBFromSchematic,
ACTIONS::updatePcbFromSchematic.MakeEvent() );
Go( &BOARD_EDITOR_CONTROL::UpdateSchematicFromPCB,

View File

@ -100,6 +100,9 @@ public:
///< Equivalent to the above, but initiated by the user.
int ExplicitCrossProbeToSch( const TOOL_EVENT& aEvent );
///< Assign a netclass to a labelled net.
int AssignNetclass( const TOOL_EVENT& aEvent );
/**
* Display a dialog to select a footprint to be added and allows the user to set its position.
*/

View File

@ -29,7 +29,6 @@
#include <tools/edit_tool.h>
#include <pcb_painter.h>
#include <connectivity/connectivity_data.h>
#include <dialogs/wx_html_report_box.h>
#include <drc/drc_engine.h>
#include <dialogs/panel_setup_rules_base.h>
#include <dialogs/dialog_constraints_reporter.h>
@ -37,6 +36,7 @@
#include "board_inspection_tool.h"
#include <pcbnew_settings.h>
#include <widgets/appearance_controls.h>
#include <widgets/wx_html_report_box.h>
#include <drc/drc_item.h>
#include <pad.h>
@ -55,10 +55,11 @@ public:
NET_CONTEXT_MENU() : ACTION_MENU( true )
{
SetIcon( BITMAPS::show_ratsnest );
SetTitle( _( "Net Tools" ) );
SetTitle( _( "Net Inspection Tools" ) );
Add( PCB_ACTIONS::showNet );
Add( PCB_ACTIONS::hideNet );
Add( PCB_ACTIONS::showNetInRatsnest );
Add( PCB_ACTIONS::hideNetInRatsnest );
AppendSeparator();
Add( PCB_ACTIONS::highlightNetSelection );
Add( PCB_ACTIONS::clearHighlight );
}
@ -75,7 +76,7 @@ bool BOARD_INSPECTION_TOOL::Init()
{
PCB_SELECTION_TOOL* selectionTool = m_toolMgr->GetTool<PCB_SELECTION_TOOL>();
auto netSubMenu = std::make_shared<NET_CONTEXT_MENU>();
std::shared_ptr<NET_CONTEXT_MENU> netSubMenu = std::make_shared<NET_CONTEXT_MENU>();
netSubMenu->SetTool( this );
static std::vector<KICAD_T> connectedTypes = { PCB_TRACE_T,
@ -86,10 +87,9 @@ bool BOARD_INSPECTION_TOOL::Init()
CONDITIONAL_MENU& menu = selectionTool->GetToolMenu().GetMenu();
selectionTool->GetToolMenu().AddSubMenu( netSubMenu );
selectionTool->GetToolMenu().RegisterSubMenu( netSubMenu );
menu.AddMenu( netSubMenu.get(), SELECTION_CONDITIONS::OnlyTypes( connectedTypes ), 200 );
menu.AddItem( PCB_ACTIONS::inspectClearance, SELECTION_CONDITIONS::Count( 2 ), 200 );
menu.AddMenu( netSubMenu.get(), SELECTION_CONDITIONS::OnlyTypes( connectedTypes ), 100 );
return true;
}
@ -101,7 +101,7 @@ void BOARD_INSPECTION_TOOL::Reset( RESET_REASON aReason )
}
int BOARD_INSPECTION_TOOL::ShowStatisticsDialog( const TOOL_EVENT& aEvent )
int BOARD_INSPECTION_TOOL::ShowBoardStatistics( const TOOL_EVENT& aEvent )
{
DIALOG_BOARD_STATISTICS dialog( m_frame );
dialog.ShowModal();
@ -1539,41 +1539,6 @@ int BOARD_INSPECTION_TOOL::ClearHighlight( const TOOL_EVENT& aEvent )
}
#if 0
int BOARD_INSPECTION_TOOL::HighlightNetTool( const TOOL_EVENT& aEvent )
{
std::string tool = *aEvent.GetCommandStr();
PCB_PICKER_TOOL* picker = m_toolMgr->GetTool<PCB_PICKER_TOOL>();
// Deactivate other tools; particularly important if another PICKER is currently running
Activate();
// If the keyboard hotkey was triggered and we are already in the highlight tool, behave
// the same as a left-click. Otherwise highlight the net of the selected item(s), or if
// there is no selection, then behave like a ctrl-left-click.
if( aEvent.IsAction( &PCB_ACTIONS::highlightNetSelection ) )
{
bool use_selection = m_frame->IsCurrentTool( PCB_ACTIONS::highlightNetTool );
highlightNet( getViewControls()->GetMousePosition(), use_selection );
}
picker->SetClickHandler(
[this] ( const VECTOR2D& pt ) -> bool
{
highlightNet( pt, false );
return true;
} );
picker->SetLayerSet( LSET::AllCuMask() );
picker->SetSnapping( false );
m_toolMgr->RunAction( ACTIONS::pickerTool, true, &tool );
return 0;
}
#endif
int BOARD_INSPECTION_TOOL::LocalRatsnestTool( const TOOL_EVENT& aEvent )
{
std::string tool = *aEvent.GetCommandStr();
@ -1653,7 +1618,7 @@ int BOARD_INSPECTION_TOOL::LocalRatsnestTool( const TOOL_EVENT& aEvent )
}
int BOARD_INSPECTION_TOOL::UpdateSelectionRatsnest( const TOOL_EVENT& aEvent )
int BOARD_INSPECTION_TOOL::UpdateLocalRatsnest( const TOOL_EVENT& aEvent )
{
VECTOR2I delta;
@ -1676,7 +1641,7 @@ int BOARD_INSPECTION_TOOL::UpdateSelectionRatsnest( const TOOL_EVENT& aEvent )
if( selection.Empty() )
{
connectivity->ClearDynamicRatsnest();
connectivity->ClearLocalRatsnest();
delete m_dynamicData;
m_dynamicData = nullptr;
}
@ -1689,9 +1654,9 @@ int BOARD_INSPECTION_TOOL::UpdateSelectionRatsnest( const TOOL_EVENT& aEvent )
}
int BOARD_INSPECTION_TOOL::HideDynamicRatsnest( const TOOL_EVENT& aEvent )
int BOARD_INSPECTION_TOOL::HideLocalRatsnest( const TOOL_EVENT& aEvent )
{
getModel<BOARD>()->GetConnectivity()->ClearDynamicRatsnest();
getModel<BOARD>()->GetConnectivity()->ClearLocalRatsnest();
delete m_dynamicData;
m_dynamicData = nullptr;
@ -1758,7 +1723,7 @@ void BOARD_INSPECTION_TOOL::calculateSelectionRatsnest( const VECTOR2I& aDelta )
m_dynamicData->Move( aDelta );
}
connectivity->ComputeDynamicRatsnest( items, m_dynamicData );
connectivity->ComputeLocalRatsnest( items, m_dynamicData );
}
@ -1821,21 +1786,21 @@ void BOARD_INSPECTION_TOOL::onInspectConstraintsDialogClosed( wxCommandEvent& ev
}
int BOARD_INSPECTION_TOOL::HideNet( const TOOL_EVENT& aEvent )
int BOARD_INSPECTION_TOOL::HideNetInRatsnest( const TOOL_EVENT& aEvent )
{
doHideNet( aEvent.Parameter<intptr_t>(), true );
doHideRatsnestNet( aEvent.Parameter<intptr_t>(), true );
return 0;
}
int BOARD_INSPECTION_TOOL::ShowNet( const TOOL_EVENT& aEvent )
int BOARD_INSPECTION_TOOL::ShowNetInRatsnest( const TOOL_EVENT& aEvent )
{
doHideNet( aEvent.Parameter<intptr_t>(), false );
doHideRatsnestNet( aEvent.Parameter<intptr_t>(), false );
return 0;
}
void BOARD_INSPECTION_TOOL::doHideNet( int aNetCode, bool aHide )
void BOARD_INSPECTION_TOOL::doHideRatsnestNet( int aNetCode, bool aHide )
{
KIGFX::PCB_RENDER_SETTINGS* rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>(
m_toolMgr->GetView()->GetPainter()->GetSettings() );
@ -1850,7 +1815,7 @@ void BOARD_INSPECTION_TOOL::doHideNet( int aNetCode, bool aHide )
if( BOARD_CONNECTED_ITEM* bci = dynamic_cast<BOARD_CONNECTED_ITEM*>( item ) )
{
if( bci->GetNetCode() > 0 )
doHideNet( bci->GetNetCode(), aHide );
doHideRatsnestNet( bci->GetNetCode(), aHide );
}
}
@ -1871,25 +1836,22 @@ void BOARD_INSPECTION_TOOL::doHideNet( int aNetCode, bool aHide )
void BOARD_INSPECTION_TOOL::setTransitions()
{
Go( &BOARD_INSPECTION_TOOL::LocalRatsnestTool,
PCB_ACTIONS::localRatsnestTool.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::HideDynamicRatsnest,
PCB_ACTIONS::hideDynamicRatsnest.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::UpdateSelectionRatsnest,
PCB_ACTIONS::updateLocalRatsnest.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::LocalRatsnestTool, PCB_ACTIONS::localRatsnestTool.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::HideLocalRatsnest, PCB_ACTIONS::hideLocalRatsnest.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::UpdateLocalRatsnest, PCB_ACTIONS::updateLocalRatsnest.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::ListNets, PCB_ACTIONS::listNets.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::ShowStatisticsDialog, PCB_ACTIONS::boardStatistics.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::InspectClearance, PCB_ACTIONS::inspectClearance.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::InspectConstraints, PCB_ACTIONS::inspectConstraints.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::ListNets, PCB_ACTIONS::listNets.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::ShowBoardStatistics, PCB_ACTIONS::boardStatistics.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::InspectClearance, PCB_ACTIONS::inspectClearance.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::InspectConstraints, PCB_ACTIONS::inspectConstraints.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::HighlightNet, PCB_ACTIONS::highlightNet.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::HighlightNet, PCB_ACTIONS::highlightNetSelection.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::HighlightNet, PCB_ACTIONS::toggleLastNetHighlight.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::ClearHighlight, PCB_ACTIONS::clearHighlight.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::HighlightNet, PCB_ACTIONS::toggleNetHighlight.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::HighlightItem, PCB_ACTIONS::highlightItem.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::HighlightNet, PCB_ACTIONS::highlightNet.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::HighlightNet, PCB_ACTIONS::highlightNetSelection.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::HighlightNet, PCB_ACTIONS::toggleLastNetHighlight.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::ClearHighlight, PCB_ACTIONS::clearHighlight.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::HighlightNet, PCB_ACTIONS::toggleNetHighlight.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::HighlightItem, PCB_ACTIONS::highlightItem.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::HideNet, PCB_ACTIONS::hideNet.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::ShowNet, PCB_ACTIONS::showNet.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::HideNetInRatsnest, PCB_ACTIONS::hideNetInRatsnest.MakeEvent() );
Go( &BOARD_INSPECTION_TOOL::ShowNetInRatsnest, PCB_ACTIONS::showNetInRatsnest.MakeEvent() );
}

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