diff --git a/common/advanced_config.cpp b/common/advanced_config.cpp index 7887d10bc9..99435ca90d 100644 --- a/common/advanced_config.cpp +++ b/common/advanced_config.cpp @@ -312,8 +312,6 @@ ADVANCED_CFG::ADVANCED_CFG() m_MaxPastedTextLength = 100; - m_hopOverArcRadius = 2.5; - loadFromConfigFile(); } diff --git a/common/confirm.cpp b/common/confirm.cpp index 7a1ce5bc6f..6fdf383595 100644 --- a/common/confirm.cpp +++ b/common/confirm.cpp @@ -32,6 +32,13 @@ #include #include +#if defined( _WIN32 ) && wxCHECK_VERSION( 3, 3, 0 ) +#define KICAD_MESSAGE_DIALOG_BASE wxGenericMessageDialog +#define KICAD_RICH_MESSAGE_DIALOG_BASE wxGenericRichMessageDialog +#else +#define KICAD_MESSAGE_DIALOG_BASE wxMessageDialog +#define KICAD_RICH_MESSAGE_DIALOG_BASE wxRichMessageDialog +#endif /** * Flag to enable confirmation dialog debugging output. @@ -53,7 +60,7 @@ bool AskOverrideLock( wxWindow* aParent, const wxString& aMessage ) + wxS( "\n" ) ); dlg.SetYesNoLabels( _( "&Cancel" ), _( "&Open Anyway" ) ); #else - wxMessageDialog dlg( aParent, aMessage, _( "File Open Warning" ), + KICAD_MESSAGE_DIALOG_BASE dlg( aParent, aMessage, _( "File Open Warning" ), wxYES_NO | wxICON_ERROR | wxCENTER ); dlg.SetExtendedMessage( _( "Interleaved saves may produce very unexpected results." ) ); dlg.SetYesNoLabels( _( "&Cancel" ), _( "&Open Anyway" ) ); @@ -67,8 +74,9 @@ int UnsavedChangesDialog( wxWindow* parent, const wxString& aMessage, bool* aApp { static bool s_apply_to_all = false; - wxRichMessageDialog dlg( parent, aMessage, _( "Save Changes?" ), - wxYES_NO | wxCANCEL | wxYES_DEFAULT | wxICON_WARNING | wxCENTER ); + KICAD_RICH_MESSAGE_DIALOG_BASE dlg( parent, aMessage, _( "Save Changes?" ), + wxYES_NO | wxCANCEL | + wxYES_DEFAULT | wxICON_WARNING | wxCENTER ); dlg.SetExtendedMessage( _( "If you don't save, all your changes will be permanently lost." ) + wxS( "\n" ) ); dlg.SetYesNoLabels( _( "&Save" ), _( "&Discard Changes" ) ); @@ -105,7 +113,7 @@ int UnsavedChangesDialog( wxWindow* parent, const wxString& aMessage ) wxWindowDisabler disable( true ); #endif - wxMessageDialog dlg( parent, aMessage, _( "Save Changes?" ), + KICAD_MESSAGE_DIALOG_BASE dlg( parent, aMessage, _( "Save Changes?" ), wxYES_NO | wxCANCEL | wxYES_DEFAULT | wxICON_WARNING | wxCENTER ); dlg.SetExtendedMessage( _( "If you don't save, all your changes will be permanently lost." ) ); dlg.SetYesNoLabels( _( "&Save" ), _( "&Discard Changes" ) ); @@ -118,8 +126,8 @@ int UnsavedChangesDialog( wxWindow* parent, const wxString& aMessage ) bool ConfirmRevertDialog( wxWindow* parent, const wxString& aMessage ) { - wxMessageDialog dlg( parent, aMessage, wxEmptyString, - wxOK | wxCANCEL | wxOK_DEFAULT | wxICON_WARNING | wxCENTER ); + KICAD_MESSAGE_DIALOG_BASE dlg( parent, aMessage, wxEmptyString, + wxOK | wxCANCEL | wxOK_DEFAULT | wxICON_WARNING | wxCENTER ); dlg.SetExtendedMessage( _( "Your current changes will be permanently lost." ) ); dlg.SetOKCancelLabels( _( "&Revert" ), _( "&Cancel" ) ); @@ -144,8 +152,8 @@ int OKOrCancelDialog( wxWindow* aParent, const wxString& aWarning, const wxStrin const wxString& aDetailedMessage, const wxString& aOKLabel, const wxString& aCancelLabel, bool* aApplyToAll ) { - wxRichMessageDialog dlg( aParent, aMessage, aWarning, - wxOK | wxCANCEL | wxOK_DEFAULT | wxICON_WARNING | wxCENTER ); + KICAD_RICH_MESSAGE_DIALOG_BASE dlg( aParent, aMessage, aWarning, + wxOK | wxCANCEL | wxOK_DEFAULT | wxICON_WARNING | wxCENTER ); dlg.SetOKCancelLabels( ( aOKLabel.IsEmpty() ) ? _( "&OK" ) : aOKLabel, ( aCancelLabel.IsEmpty() ) ? _( "&Cancel" ) : aCancelLabel ); @@ -181,10 +189,11 @@ void DisplayError( wxWindow* aParent, const wxString& aText ) return; } - wxMessageDialog* dlg; + KICAD_MESSAGE_DIALOG_BASE* dlg; - dlg = new wxMessageDialog( aParent, aText, _( "Error" ), - wxOK | wxCENTRE | wxRESIZE_BORDER | wxICON_ERROR | wxSTAY_ON_TOP ); + dlg = new KICAD_MESSAGE_DIALOG_BASE( aParent, aText, _( "Error" ), + wxOK | wxCENTRE | wxRESIZE_BORDER | + wxICON_ERROR | wxSTAY_ON_TOP ); dlg->ShowModal(); dlg->Destroy(); @@ -205,10 +214,11 @@ void DisplayErrorMessage( wxWindow* aParent, const wxString& aText, const wxStri return; } - wxMessageDialog* dlg; + KICAD_MESSAGE_DIALOG_BASE* dlg; - dlg = new wxMessageDialog( aParent, aText, _( "Error" ), - wxOK | wxCENTRE | wxRESIZE_BORDER | wxICON_ERROR | wxSTAY_ON_TOP ); + dlg = new KICAD_MESSAGE_DIALOG_BASE( aParent, aText, _( "Error" ), + wxOK | wxCENTRE | wxRESIZE_BORDER | + wxICON_ERROR | wxSTAY_ON_TOP ); if( !aExtraInfo.IsEmpty() ) dlg->SetExtendedMessage( aExtraInfo ); @@ -232,11 +242,12 @@ void DisplayInfoMessage( wxWindow* aParent, const wxString& aMessage, const wxSt return; } - wxMessageDialog* dlg; + KICAD_MESSAGE_DIALOG_BASE* dlg; int icon = wxICON_INFORMATION; - dlg = new wxMessageDialog( aParent, aMessage, _( "Information" ), - wxOK | wxCENTRE | wxRESIZE_BORDER | icon | wxSTAY_ON_TOP ); + dlg = new KICAD_MESSAGE_DIALOG_BASE( aParent, aMessage, _( "Information" ), + wxOK | wxCENTRE | wxRESIZE_BORDER | + icon | wxSTAY_ON_TOP ); if( !aExtraInfo.IsEmpty() ) dlg->SetExtendedMessage( aExtraInfo ); @@ -262,8 +273,9 @@ bool IsOK( wxWindow* aParent, const wxString& aMessage ) #endif #if !defined( __WXGTK__ ) - wxRichMessageDialog dlg( aParent, aMessage, _( "Confirmation" ), - wxOK | wxCANCEL | wxOK_DEFAULT | wxCENTRE | icon | wxSTAY_ON_TOP ); + KICAD_RICH_MESSAGE_DIALOG_BASE dlg( aParent, aMessage, _( "Confirmation" ), + wxOK | wxCANCEL | wxOK_DEFAULT | + wxCENTRE | icon | wxSTAY_ON_TOP ); #else wxMessageDialog dlg( aParent, aMessage, _( "Confirmation" ), wxOK | wxCANCEL | wxOK_DEFAULT | wxCENTRE | icon | wxSTAY_ON_TOP ); diff --git a/common/dialogs/dialog_configure_paths.cpp b/common/dialogs/dialog_configure_paths.cpp index d6b23646c4..eb47f66373 100644 --- a/common/dialogs/dialog_configure_paths.cpp +++ b/common/dialogs/dialog_configure_paths.cpp @@ -82,9 +82,6 @@ DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS( wxWindow* aParent ) : attr->SetEditor( new GRID_CELL_PATH_EDITOR( this, m_EnvVars, &m_curdir, wxEmptyString ) ); m_EnvVars->SetColAttr( TV_VALUE_COL, attr ); - // Give a bit more room for combobox editors - m_EnvVars->SetDefaultRowSize( m_EnvVars->GetDefaultRowSize() + FromDIP( 4 ) ); - m_EnvVars->PushEventHandler( new GRID_TRICKS( m_EnvVars, [this]( wxCommandEvent& aEvent ) { diff --git a/common/dialogs/dialog_plugin_options.cpp b/common/dialogs/dialog_plugin_options.cpp index 066546957c..bb7438487d 100644 --- a/common/dialogs/dialog_plugin_options.cpp +++ b/common/dialogs/dialog_plugin_options.cpp @@ -39,22 +39,19 @@ DIALOG_PLUGIN_OPTIONS::DIALOG_PLUGIN_OPTIONS( wxWindow* aParent, - const wxString& aNickname, - const std::map& aPluginOptions, - const wxString& aFormattedOptions, - wxString* aResult ) : - DIALOG_PLUGIN_OPTIONS_BASE( aParent ), - m_callers_options( aFormattedOptions ), - m_result( aResult ), - m_choices( aPluginOptions ), - m_initial_help( INITIAL_HELP ), - m_grid_widths_dirty( true ) + const wxString& aNickname, + const std::map& aPluginOptions, + const wxString& aFormattedOptions, + wxString* aResult ) : + DIALOG_PLUGIN_OPTIONS_BASE( aParent ), + m_callers_options( aFormattedOptions ), + m_result( aResult ), + m_choices( aPluginOptions ), + m_initial_help( INITIAL_HELP ), + m_grid_widths_dirty( true ) { SetTitle( wxString::Format( _( "Options for Library '%s'" ), aNickname ) ); - // Give a bit more room for combobox editors - m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() + 4 ); - m_grid->SetSelectionMode( wxGrid::wxGridSelectionModes::wxGridSelectRows ); // add Cut, Copy, and Paste to wxGrid @@ -65,8 +62,7 @@ DIALOG_PLUGIN_OPTIONS::DIALOG_PLUGIN_OPTIONS( wxWindow* aParent, { unsigned int row = 0; - for( std::map::const_iterator it = m_choices.begin(); - it != m_choices.end(); ++it, ++row ) + for( std::map::const_iterator it = m_choices.begin(); it != m_choices.end(); ++it, ++row ) { wxString item = From_UTF8( it->first.c_str() ); @@ -111,8 +107,7 @@ bool DIALOG_PLUGIN_OPTIONS::TransferDataToWindow() int row = 0; - for( std::map::const_iterator it = props->begin(); it != props->end(); - ++it, ++row ) + for( std::map::const_iterator it = props->begin(); it != props->end(); ++it, ++row ) { m_grid->SetCellValue( row, 0, From_UTF8( it->first.c_str() ) ); m_grid->SetCellValue( row, 1, it->second ); @@ -142,9 +137,7 @@ bool DIALOG_PLUGIN_OPTIONS::TransferDataFromWindow() UTF8 value = m_grid->GetCellValue( row, 1 ).Trim( false ).Trim(); if( name.size() ) - { props[name] = value; - } } *m_result = LIB_TABLE::FormatOptions( &props ).wx_str(); diff --git a/common/dialogs/panel_design_block_lib_table.cpp b/common/dialogs/panel_design_block_lib_table.cpp index 77a543a7bf..c6e18f734b 100644 --- a/common/dialogs/panel_design_block_lib_table.cpp +++ b/common/dialogs/panel_design_block_lib_table.cpp @@ -65,81 +65,6 @@ #include #include -// clang-format off - -/** - * Container that describes file type info for the add a library options - */ -struct SUPPORTED_FILE_TYPE -{ - wxString m_Description; ///< Description shown in the file picker dialog. - wxString m_FileFilter; ///< Filter used for file pickers if m_IsFile is true. - wxString m_FolderSearchExtension; ///< In case of folders it stands for extensions of files - ///< stored inside. - bool m_IsFile; ///< Whether the library is a folder or a file. - DESIGN_BLOCK_IO_MGR::DESIGN_BLOCK_FILE_T m_Plugin; -}; - -// clang-format on - -/** - * Traverser implementation that looks to find any and all "folder" libraries by looking for files - * with a specific extension inside folders - */ -class LIBRARY_TRAVERSER : public wxDirTraverser -{ -public: - LIBRARY_TRAVERSER( std::vector aSearchExtensions, wxString aInitialDir ) : - m_searchExtensions( aSearchExtensions ), m_currentDir( aInitialDir ) - { - } - - virtual wxDirTraverseResult OnFile( const wxString& aFileName ) override - { - wxFileName file( aFileName ); - - for( const std::string& ext : m_searchExtensions ) - { - if( file.GetExt().IsSameAs( ext, false ) ) - m_foundDirs.insert( { m_currentDir, 1 } ); - } - - return wxDIR_CONTINUE; - } - - virtual wxDirTraverseResult OnOpenError( const wxString& aOpenErrorName ) override - { - m_failedDirs.insert( { aOpenErrorName, 1 } ); - return wxDIR_IGNORE; - } - - bool HasDirectoryOpenFailures() { return m_failedDirs.size() > 0; } - - virtual wxDirTraverseResult OnDir( const wxString& aDirName ) override - { - m_currentDir = aDirName; - return wxDIR_CONTINUE; - } - - void GetPaths( wxArrayString& aPathArray ) - { - for( std::pair& foundDirsPair : m_foundDirs ) - aPathArray.Add( foundDirsPair.first ); - } - - void GetFailedPaths( wxArrayString& aPathArray ) - { - for( std::pair& failedDirsPair : m_failedDirs ) - aPathArray.Add( failedDirsPair.first ); - } - -private: - std::vector m_searchExtensions; - wxString m_currentDir; - std::unordered_map m_foundDirs; - std::unordered_map m_failedDirs; -}; - /** * This class builds a wxGridTableBase by wrapping an #DESIGN_BLOCK_LIB_TABLE object. @@ -299,8 +224,11 @@ PANEL_DESIGN_BLOCK_LIB_TABLE::PANEL_DESIGN_BLOCK_LIB_TABLE( DIALOG_EDIT_LIBRARY_ const wxString& aProjectTblPath, const wxString& aProjectBasePath ) : PANEL_DESIGN_BLOCK_LIB_TABLE_BASE( aParent ), - m_globalTable( aGlobalTable ), m_projectTable( aProjectTable ), m_project( aProject ), - m_projectBasePath( aProjectBasePath ), m_parent( aParent ) + m_globalTable( aGlobalTable ), + m_projectTable( aProjectTable ), + m_project( aProject ), + m_projectBasePath( aProjectBasePath ), + m_parent( aParent ) { m_global_grid->SetTable( new DESIGN_BLOCK_LIB_TABLE_GRID( *aGlobalTable ), true ); @@ -336,9 +264,6 @@ PANEL_DESIGN_BLOCK_LIB_TABLE::PANEL_DESIGN_BLOCK_LIB_TABLE( DIALOG_EDIT_LIBRARY_ auto setupGrid = [&]( WX_GRID* aGrid ) { - // Give a bit more room for wxChoice editors - aGrid->SetDefaultRowSize( aGrid->GetDefaultRowSize() + 4 ); - // add Cut, Copy, and Paste to wxGrids aGrid->PushEventHandler( new DESIGN_BLOCK_GRID_TRICKS( m_parent, aGrid ) ); @@ -1171,10 +1096,6 @@ void PANEL_DESIGN_BLOCK_LIB_TABLE::populateEnvironReadOnlyTable() m_path_subs_grid->SetCellEditor( row, 1, new GRID_CELL_READONLY_TEXT_EDITOR() ); } - // No combobox editors here, but it looks better if its consistent with the other - // grids in the dialog. - m_path_subs_grid->SetDefaultRowSize( m_path_subs_grid->GetDefaultRowSize() + 2 ); - adjustPathSubsGridColumns( m_path_subs_grid->GetRect().GetWidth() ); } diff --git a/common/dialogs/panel_embedded_files.cpp b/common/dialogs/panel_embedded_files.cpp index 55de074d6f..3f65eee0c7 100644 --- a/common/dialogs/panel_embedded_files.cpp +++ b/common/dialogs/panel_embedded_files.cpp @@ -41,7 +41,8 @@ /* ---------- GRID_TRICKS for embedded files grid ---------- */ EMBEDDED_FILES_GRID_TRICKS::EMBEDDED_FILES_GRID_TRICKS( WX_GRID* aGrid ) : - GRID_TRICKS( aGrid ), m_curRow( -1 ) + GRID_TRICKS( aGrid ), + m_curRow( -1 ) { } @@ -89,7 +90,9 @@ void EMBEDDED_FILES_GRID_TRICKS::doPopupSelection( wxCommandEvent& event ) PANEL_EMBEDDED_FILES::PANEL_EMBEDDED_FILES( wxWindow* parent, EMBEDDED_FILES* aFiles ) : - PANEL_EMBEDDED_FILES_BASE( parent ), m_files( aFiles ), m_localFiles( new EMBEDDED_FILES() ) + PANEL_EMBEDDED_FILES_BASE( parent ), + m_files( aFiles ), + m_localFiles( new EMBEDDED_FILES() ) { for( auto& [name, file] : m_files->EmbeddedFileMap() ) { @@ -105,23 +108,24 @@ PANEL_EMBEDDED_FILES::PANEL_EMBEDDED_FILES( wxWindow* parent, EMBEDDED_FILES* aF m_files_grid->PushEventHandler( new EMBEDDED_FILES_GRID_TRICKS( m_files_grid ) ); - m_localFiles->SetFileAddedCallback( [this](EMBEDDED_FILES::EMBEDDED_FILE* file) { - - for( int ii = 0; ii < m_files_grid->GetNumberRows(); ii++ ) - { - if( m_files_grid->GetCellValue( ii, 1 ) == file->GetLink() ) + m_localFiles->SetFileAddedCallback( + [this](EMBEDDED_FILES::EMBEDDED_FILE* file) { - m_files_grid->DeleteRows( ii ); - break; - } - } + for( int ii = 0; ii < m_files_grid->GetNumberRows(); ii++ ) + { + if( m_files_grid->GetCellValue( ii, 1 ) == file->GetLink() ) + { + m_files_grid->DeleteRows( ii ); + break; + } + } - m_files_grid->AppendRows( 1 ); - int ii = m_files_grid->GetNumberRows() - 1; - m_files_grid->SetCellValue( ii, 0, file->name ); - m_files_grid->SetCellValue( ii, 1, file->GetLink() ); + m_files_grid->AppendRows( 1 ); + int ii = m_files_grid->GetNumberRows() - 1; + m_files_grid->SetCellValue( ii, 0, file->name ); + m_files_grid->SetCellValue( ii, 1, file->GetLink() ); - }); + } ); } @@ -166,6 +170,7 @@ bool PANEL_EMBEDDED_FILES::TransferDataToWindow() m_files_grid->DeleteRows( 0, m_files_grid->GetNumberRows() ); int ii = 0; + for( auto& [name, file] : m_localFiles->EmbeddedFileMap() ) { while( m_files_grid->GetNumberRows() < ii + 1 ) @@ -191,11 +196,10 @@ bool PANEL_EMBEDDED_FILES::TransferDataFromWindow() std::vector files; - for( auto it = m_localFiles->EmbeddedFileMap().begin(); - it != m_localFiles->EmbeddedFileMap().end(); it++ ) - files.push_back( it->second ); + for( const auto& [name, file] : m_localFiles->EmbeddedFileMap() ) + files.push_back( file ); - for( auto& file : files ) + for( EMBEDDED_FILES::EMBEDDED_FILE* file : files ) { m_files->AddFile( file ); m_localFiles->RemoveFile( file->name, false ); @@ -237,8 +241,7 @@ void PANEL_EMBEDDED_FILES::onFontEmbedClick( wxCommandEvent& event ) for( KIFONT::OUTLINE_FONT* font : fonts ) { - EMBEDDED_FILES::EMBEDDED_FILE* result = - m_localFiles->AddFile( font->GetFileName(), true ); + EMBEDDED_FILES::EMBEDDED_FILE* result = m_localFiles->AddFile( font->GetFileName(), true ); if( !result ) { @@ -326,7 +329,7 @@ void PANEL_EMBEDDED_FILES::onAddEmbeddedFiles( wxCommandEvent& event ) wxArrayString paths; fileDialog.GetPaths( paths ); - for( wxString path : paths ) + for( const wxString& path : paths ) AddEmbeddedFile( path ); } } @@ -396,11 +399,9 @@ void PANEL_EMBEDDED_FILES::onExportFiles( wxCommandEvent& event ) if( fileName.FileExists() ) { - wxString msg = wxString::Format( _( "File '%s' already exists." ), - fileName.GetFullName() ); + wxString msg = wxString::Format( _( "File '%s' already exists." ), fileName.GetFullName() ); - KIDIALOG errorDlg( m_parent, msg, _( "Confirmation" ), - wxOK | wxCANCEL | wxICON_WARNING ); + KIDIALOG errorDlg( m_parent, msg, _( "Confirmation" ), wxOK | wxCANCEL | wxICON_WARNING ); errorDlg.SetOKCancelLabels( _( "Overwrite" ), _( "Skip" ) ); errorDlg.DoNotShowCheckbox( __FILE__, __LINE__ ); @@ -415,11 +416,9 @@ void PANEL_EMBEDDED_FILES::onExportFiles( wxCommandEvent& event ) if( !fileName.IsDirWritable() ) { #ifndef __WXMAC__ - wxString msg = wxString::Format( _( "Directory '%s' is not writable." ), - fileName.GetFullName() ); + wxString msg = wxString::Format( _( "Directory '%s' is not writable." ), fileName.GetFullName() ); #else - wxString msg = wxString::Format( _( "Folder '%s' is not writable." ), - fileName.GetPath() ); + wxString msg = wxString::Format( _( "Folder '%s' is not writable." ), fileName.GetPath() ); #endif // Don't set a 'do not show again' checkbox for this dialog KIDIALOG errorDlg( m_parent, msg, _( "Error" ), wxYES_NO | wxCANCEL | wxICON_ERROR ); @@ -451,8 +450,7 @@ void PANEL_EMBEDDED_FILES::onExportFiles( wxCommandEvent& event ) if( !out.IsOk() ) { - wxString msg = wxString::Format( _( "Failed to open file '%s'." ), - fileName.GetFullName() ); + wxString msg = wxString::Format( _( "Failed to open file '%s'." ), fileName.GetFullName() ); KIDIALOG errorDlg( m_parent, msg, _( "Error" ), wxOK | wxICON_ERROR ); errorDlg.ShowModal(); @@ -463,8 +461,7 @@ void PANEL_EMBEDDED_FILES::onExportFiles( wxCommandEvent& event ) if( !out.IsOk() || ( out.LastWrite() != file->decompressedData.size() ) ) { - wxString msg = wxString::Format( _( "Failed to write file '%s'." ), - fileName.GetFullName() ); + wxString msg = wxString::Format( _( "Failed to write file '%s'." ), fileName.GetFullName() ); KIDIALOG errorDlg( m_parent, msg, _( "Error" ), wxOK | wxICON_ERROR ); diff --git a/common/dialogs/panel_setup_netclasses.cpp b/common/dialogs/panel_setup_netclasses.cpp index 9a17ff0f29..c3b73f4d5d 100644 --- a/common/dialogs/panel_setup_netclasses.cpp +++ b/common/dialogs/panel_setup_netclasses.cpp @@ -161,14 +161,12 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA wxGridCellAttr* attr = new wxGridCellAttr; attr->SetRenderer( new GRID_CELL_COLOR_RENDERER( PAGED_DIALOG::GetDialog( this ) ) ); - attr->SetEditor( new GRID_CELL_COLOR_SELECTOR( PAGED_DIALOG::GetDialog( this ), - m_netclassGrid ) ); + attr->SetEditor( new GRID_CELL_COLOR_SELECTOR( PAGED_DIALOG::GetDialog( this ), m_netclassGrid ) ); m_netclassGrid->SetColAttr( GRID_SCHEMATIC_COLOR, attr ); attr = new wxGridCellAttr; attr->SetRenderer( new GRID_CELL_COLOR_RENDERER( PAGED_DIALOG::GetDialog( this ) ) ); - attr->SetEditor( new GRID_CELL_COLOR_SELECTOR( PAGED_DIALOG::GetDialog( this ), - m_netclassGrid ) ); + attr->SetEditor( new GRID_CELL_COLOR_SELECTOR( PAGED_DIALOG::GetDialog( this ), m_netclassGrid ) ); m_netclassGrid->SetColAttr( GRID_PCB_COLOR, attr ); attr = new wxGridCellAttr; @@ -182,8 +180,7 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA } else { - m_colorDefaultHelpText->SetLabel( - _( "Set color to transparent to use layer default color." ) ); + m_colorDefaultHelpText->SetLabel( _( "Set color to transparent to use layer default color." ) ); m_colorDefaultHelpText->GetParent()->Layout(); } @@ -204,11 +201,6 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA // Be sure the column labels are readable m_netclassGrid->EnsureColLabelsVisible(); - // Membership combobox editors require a bit more room, so increase the row size of - // all our grids for consistency - m_netclassGrid->SetDefaultRowSize( m_netclassGrid->GetDefaultRowSize() + 4 ); - m_assignmentGrid->SetDefaultRowSize( m_assignmentGrid->GetDefaultRowSize() + 4 ); - m_netclassGrid->PushEventHandler( new GRID_TRICKS( m_netclassGrid ) ); m_assignmentGrid->PushEventHandler( new GRID_TRICKS( m_assignmentGrid ) ); @@ -232,14 +224,13 @@ PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES( wxWindow* aParentWindow, EDA_DRA nullptr, this ); // Handle tooltips for grid - m_netclassGrid->GetGridColLabelWindow()->Bind( wxEVT_MOTION, - &PANEL_SETUP_NETCLASSES::OnNetclassGridMouseEvent, + m_netclassGrid->GetGridColLabelWindow()->Bind( wxEVT_MOTION, &PANEL_SETUP_NETCLASSES::OnNetclassGridMouseEvent, this ); // Allow sorting assignments by column - m_assignmentGrid->Connect( - wxEVT_GRID_LABEL_LEFT_CLICK, - wxGridEventHandler( PANEL_SETUP_NETCLASSES::OnNetclassAssignmentSort ), nullptr, this ); + m_assignmentGrid->Connect( wxEVT_GRID_LABEL_LEFT_CLICK, + wxGridEventHandler( PANEL_SETUP_NETCLASSES::OnNetclassAssignmentSort ), + nullptr, this ); m_frame->Bind( EDA_EVT_UNITS_CHANGED, &PANEL_SETUP_NETCLASSES::onUnitsChanged, this ); @@ -284,9 +275,9 @@ PANEL_SETUP_NETCLASSES::~PANEL_SETUP_NETCLASSES() wxGridEventHandler( PANEL_SETUP_NETCLASSES::OnNetclassGridCellChanging ), nullptr, this ); - m_assignmentGrid->Disconnect( - wxEVT_GRID_LABEL_LEFT_CLICK, - wxGridEventHandler( PANEL_SETUP_NETCLASSES::OnNetclassAssignmentSort ), nullptr, this ); + m_assignmentGrid->Disconnect( wxEVT_GRID_LABEL_LEFT_CLICK, + wxGridEventHandler( PANEL_SETUP_NETCLASSES::OnNetclassAssignmentSort ), + nullptr, this ); m_frame->Unbind( EDA_EVT_UNITS_CHANGED, &PANEL_SETUP_NETCLASSES::onUnitsChanged, this ); } @@ -300,10 +291,8 @@ void PANEL_SETUP_NETCLASSES::loadNetclasses() m_netclassGrid->SetCellValue( aRow, GRID_NAME, nc->GetName() ); m_netclassGrid->SetCellValue( aRow, GRID_DELAY_PROFILE, nc->GetDelayProfile() ); - m_netclassGrid->SetOptionalUnitValue( aRow, GRID_WIREWIDTH, - nc->GetWireWidthOpt() ); - m_netclassGrid->SetOptionalUnitValue( aRow, GRID_BUSWIDTH, - nc->GetBusWidthOpt() ); + m_netclassGrid->SetOptionalUnitValue( aRow, GRID_WIREWIDTH, nc->GetWireWidthOpt() ); + m_netclassGrid->SetOptionalUnitValue( aRow, GRID_BUSWIDTH, nc->GetBusWidthOpt() ); wxString colorAsString = nc->GetSchematicColor().ToCSSString(); m_netclassGrid->SetCellValue( aRow, GRID_SCHEMATIC_COLOR, colorAsString ); @@ -315,28 +304,22 @@ void PANEL_SETUP_NETCLASSES::loadNetclasses() if( lineStyleIdx >= (int) g_lineStyleNames.size() + 1 ) lineStyleIdx = 0; - m_netclassGrid->SetCellValue( aRow, GRID_LINESTYLE, - g_lineStyleNames[lineStyleIdx + 1] ); + m_netclassGrid->SetCellValue( aRow, GRID_LINESTYLE, g_lineStyleNames[lineStyleIdx + 1] ); } else { // line style in list. - m_netclassGrid->SetCellValue( aRow, GRID_LINESTYLE, - g_lineStyleNames[0] ); + m_netclassGrid->SetCellValue( aRow, GRID_LINESTYLE, g_lineStyleNames[0] ); } m_netclassGrid->SetOptionalUnitValue( aRow, GRID_CLEARANCE, nc->GetClearanceOpt() ); - m_netclassGrid->SetOptionalUnitValue( aRow, GRID_TRACKSIZE, - nc->GetTrackWidthOpt() ); + m_netclassGrid->SetOptionalUnitValue( aRow, GRID_TRACKSIZE, nc->GetTrackWidthOpt() ); m_netclassGrid->SetOptionalUnitValue( aRow, GRID_VIASIZE, nc->GetViaDiameterOpt() ); m_netclassGrid->SetOptionalUnitValue( aRow, GRID_VIADRILL, nc->GetViaDrillOpt() ); - m_netclassGrid->SetOptionalUnitValue( aRow, GRID_uVIASIZE, - nc->GetuViaDiameterOpt() ); + m_netclassGrid->SetOptionalUnitValue( aRow, GRID_uVIASIZE, nc->GetuViaDiameterOpt() ); m_netclassGrid->SetOptionalUnitValue( aRow, GRID_uVIADRILL, nc->GetuViaDrillOpt() ); - m_netclassGrid->SetOptionalUnitValue( aRow, GRID_DIFF_PAIR_WIDTH, - nc->GetDiffPairWidthOpt() ); - m_netclassGrid->SetOptionalUnitValue( aRow, GRID_DIFF_PAIR_GAP, - nc->GetDiffPairGapOpt() ); + m_netclassGrid->SetOptionalUnitValue( aRow, GRID_DIFF_PAIR_WIDTH, nc->GetDiffPairWidthOpt() ); + m_netclassGrid->SetOptionalUnitValue( aRow, GRID_DIFF_PAIR_GAP, nc->GetDiffPairGapOpt() ); colorAsString = nc->GetPcbColor().ToCSSString(); m_netclassGrid->SetCellValue( aRow, GRID_PCB_COLOR, colorAsString ); @@ -554,8 +537,7 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow() // Copy other NetClasses: for( int row = 0; row < m_netclassGrid->GetNumberRows() - 1; ++row ) { - auto nc = - std::make_shared( m_netclassGrid->GetCellValue( row, GRID_NAME ), false ); + auto nc = std::make_shared( m_netclassGrid->GetCellValue( row, GRID_NAME ), false ); gridRowToNetclass( row, nc ); m_netSettings->SetNetclass( nc->GetName(), nc ); } @@ -970,8 +952,7 @@ void PANEL_SETUP_NETCLASSES::OnUpdateUI( wxUpdateUIEvent& event ) { EDA_COMBINED_MATCHER matcher( pattern, CTX_NETCLASS ); - m_matchingNets->Report( wxString::Format( _( "Nets matching '%s':" ), - pattern ) ); + m_matchingNets->Report( wxString::Format( _( "Nets matching '%s':" ), pattern ) ); for( const wxString& net : m_netNames ) { @@ -1051,8 +1032,7 @@ void PANEL_SETUP_NETCLASSES::OnMoveNetclassUpClick( wxCommandEvent& event ) m_netclassGrid->InsertRows( newRowId ); for( int col = 0; col < m_netclassGrid->GetNumberCols(); col++ ) - m_netclassGrid->SetCellValue( newRowId, col, - m_netclassGrid->GetCellValue( newRowId + 2, col ) ); + m_netclassGrid->SetCellValue( newRowId, col, m_netclassGrid->GetCellValue( newRowId + 2, col ) ); // Set the row nullable editors setNetclassRowNullableEditors( newRowId, false ); @@ -1086,16 +1066,15 @@ void PANEL_SETUP_NETCLASSES::OnMoveNetclassDownClick( wxCommandEvent& event ) // Can't move the last row down, nor move the Default netclass if( selectedRows[0] == ( m_netclassGrid->GetNumberRows() - 2 ) || selectedRows[0] == ( m_netclassGrid->GetNumberRows() - 1 ) ) + { return; + } int newRowId = selectedRows[0] + 2; m_netclassGrid->InsertRows( newRowId ); for( int col = 0; col < m_netclassGrid->GetNumberCols(); col++ ) - { - m_netclassGrid->SetCellValue( newRowId, col, - m_netclassGrid->GetCellValue( newRowId - 2, col ) ); - } + m_netclassGrid->SetCellValue( newRowId, col, m_netclassGrid->GetCellValue( newRowId - 2, col ) ); m_netclassGrid->DeleteRows( newRowId - 2, 1 ); m_netclassGrid->MakeCellVisible( newRowId - 1, 0 ); diff --git a/common/dialogs/panel_text_variables.cpp b/common/dialogs/panel_text_variables.cpp index 846e19ae12..e39d2fb0bc 100644 --- a/common/dialogs/panel_text_variables.cpp +++ b/common/dialogs/panel_text_variables.cpp @@ -43,8 +43,11 @@ enum TEXT_VAR_GRID_COLUMNS PANEL_TEXT_VARIABLES::PANEL_TEXT_VARIABLES( wxWindow* aParent, PROJECT* aProject ) : - PANEL_TEXT_VARIABLES_BASE( aParent ), m_project( aProject ), m_lastCheckedTicker( 0 ), - m_errorRow( -1 ), m_errorCol( -1 ) + PANEL_TEXT_VARIABLES_BASE( aParent ), + m_project( aProject ), + m_lastCheckedTicker( 0 ), + m_errorRow( -1 ), + m_errorCol( -1 ) { m_btnAddTextVar->SetBitmap( KiBitmapBundle( BITMAPS::small_plus ) ); m_btnDeleteTextVar->SetBitmap( KiBitmapBundle( BITMAPS::small_trash ) ); diff --git a/common/jobs/job_export_sch_plot.cpp b/common/jobs/job_export_sch_plot.cpp index 621ba57521..edf7adcaea 100644 --- a/common/jobs/job_export_sch_plot.cpp +++ b/common/jobs/job_export_sch_plot.cpp @@ -71,7 +71,7 @@ JOB_EXPORT_SCH_PLOT::JOB_EXPORT_SCH_PLOT( bool aOutputIsDirectory ) : &m_blackAndWhite, m_blackAndWhite ) ); m_params.emplace_back( new JOB_PARAM( "show_hop_over", - &m_blackAndWhite, m_show_hop_over ) ); + &m_show_hop_over, m_show_hop_over ) ); m_params.emplace_back( new JOB_PARAM( "page_size", &m_pageSizeSelect, m_pageSizeSelect ) ); diff --git a/common/kidialog.cpp b/common/kidialog.cpp index 1fabf462ec..29133b44c9 100644 --- a/common/kidialog.cpp +++ b/common/kidialog.cpp @@ -32,7 +32,7 @@ static std::unordered_map doNotShowAgainDlgs; KIDIALOG::KIDIALOG( wxWindow* aParent, const wxString& aMessage, const wxString& aCaption, long aStyle ) - : wxRichMessageDialog( aParent, aMessage, aCaption, aStyle | wxCENTRE | wxSTAY_ON_TOP ), + : KIDIALOG_BASE( aParent, aMessage, aCaption, aStyle | wxCENTRE | wxSTAY_ON_TOP ), m_hash( 0 ), m_cancelMeansCancel( true ) { @@ -41,7 +41,7 @@ KIDIALOG::KIDIALOG( wxWindow* aParent, const wxString& aMessage, const wxString& KIDIALOG::KIDIALOG( wxWindow* aParent, const wxString& aMessage, KD_TYPE aType, const wxString& aCaption ) - : wxRichMessageDialog( aParent, aMessage, getCaption( aType, aCaption ), getStyle( aType ) ), + : KIDIALOG_BASE( aParent, aMessage, getCaption( aType, aCaption ), getStyle( aType ) ), m_hash( 0 ), m_cancelMeansCancel( true ) { @@ -80,7 +80,7 @@ bool KIDIALOG::Show( bool aShow ) return it->second; } - int ret = wxRichMessageDialog::Show( aShow ); + int ret = KIDIALOG_BASE::Show( aShow ); // Has the user asked not to show the dialog again? // Note that we don't save a Cancel value unless the Cancel button is being used for some @@ -100,7 +100,7 @@ int KIDIALOG::ShowModal() if( it != doNotShowAgainDlgs.end() ) return it->second; - int ret = wxRichMessageDialog::ShowModal(); + int ret = KIDIALOG_BASE::ShowModal(); // Has the user asked not to show the dialog again? // Note that we don't save a Cancel value unless the Cancel button is being used for some diff --git a/common/netclass.cpp b/common/netclass.cpp index f20f9fd570..5e96d6ca8a 100644 --- a/common/netclass.cpp +++ b/common/netclass.cpp @@ -296,17 +296,23 @@ const wxString NETCLASS::GetHumanReadableName() const if( m_constituents.size() == 2 ) { - name.Printf( _( "%s and %s" ), m_constituents[0]->GetName(), m_constituents[1]->GetName() ); + name.Printf( _( "%s and %s" ), + m_constituents[0]->GetName(), + m_constituents[1]->GetName() ); } else if( m_constituents.size() == 3 ) { - name.Printf( _( "%s, %s and %s" ), m_constituents[0]->GetName(), - m_constituents[1]->GetName(), m_constituents[2]->GetName() ); + name.Printf( _( "%s, %s and %s" ), + m_constituents[0]->GetName(), + m_constituents[1]->GetName(), + m_constituents[2]->GetName() ); } else if( m_constituents.size() > 3 ) { - name.Printf( _( "%s, %s and %d more" ), m_constituents[0]->GetName(), - m_constituents[1]->GetName(), static_cast( m_constituents.size() - 2 ) ); + name.Printf( _( "%s, %s and %d more" ), + m_constituents[0]->GetName(), + m_constituents[1]->GetName(), + static_cast( m_constituents.size() - 2 ) ); } return name; diff --git a/common/tool/action_toolbar.cpp b/common/tool/action_toolbar.cpp index c78149b8a2..5f36808c78 100644 --- a/common/tool/action_toolbar.cpp +++ b/common/tool/action_toolbar.cpp @@ -263,6 +263,14 @@ void ACTION_TOOLBAR::ApplyConfiguration( const TOOLBAR_CONFIGURATION& aConfig ) { wxASSERT( GetParent() ); + std::map currentGroupItems; + + for( const auto& [id, group] : m_actionGroups ) + { + if( m_toolActions[group->GetUIId()] ) + currentGroupItems[group->GetName()] = m_toolActions[group->GetUIId()]->GetName(); + } + // Remove existing tools ClearToolbar(); @@ -284,9 +292,11 @@ void ACTION_TOOLBAR::ApplyConfiguration( const TOOLBAR_CONFIGURATION& aConfig ) case TOOLBAR_ITEM_TYPE::TB_GROUP: { // Add a group of items to the toolbar + std::string groupName = item.m_GroupName.ToStdString(); std::vector tools; + const TOOL_ACTION* defaultTool = nullptr; - for( auto& groupItem : item.m_GroupItems ) + for( TOOLBAR_ITEM& groupItem : item.m_GroupItems ) { switch( groupItem.m_Type ) { @@ -294,7 +304,7 @@ void ACTION_TOOLBAR::ApplyConfiguration( const TOOLBAR_CONFIGURATION& aConfig ) case TOOLBAR_ITEM_TYPE::SPACER: case TOOLBAR_ITEM_TYPE::TB_GROUP: case TOOLBAR_ITEM_TYPE::CONTROL: - wxASSERT_MSG( false, "Unsupported group item type" ); + wxFAIL_MSG( wxT( "Unsupported group item type" ) ); continue; case TOOLBAR_ITEM_TYPE::TOOL: @@ -302,15 +312,23 @@ void ACTION_TOOLBAR::ApplyConfiguration( const TOOLBAR_CONFIGURATION& aConfig ) if( !grpAction ) { - wxASSERT_MSG( false, wxString::Format( "Unable to find group tool %s", groupItem.m_ActionName ) ); + wxFAIL_MSG( wxString::Format( wxT( "Unable to find group tool %s" ), groupItem.m_ActionName ) ); continue; } tools.push_back( grpAction ); + + if( currentGroupItems[groupName] == groupItem.m_ActionName ) + defaultTool = grpAction; } } - AddGroup( std::make_unique( item.m_GroupName.ToStdString(), tools ) ); + std::unique_ptr group = std::make_unique( groupName, tools ); + + if( defaultTool ) + group->SetDefaultAction( *defaultTool ); + + AddGroup( std::move( group ) ); break; } @@ -322,7 +340,7 @@ void ACTION_TOOLBAR::ApplyConfiguration( const TOOLBAR_CONFIGURATION& aConfig ) if( !factory ) { - wxASSERT_MSG( false, wxString::Format( "Unable to find control factory for %s", item.m_ControlName ) ); + wxFAIL_MSG( wxString::Format( wxT( "Unable to find control factory for %s" ), item.m_ControlName ) ); continue; } @@ -337,7 +355,7 @@ void ACTION_TOOLBAR::ApplyConfiguration( const TOOLBAR_CONFIGURATION& aConfig ) if( !action ) { - wxASSERT_MSG( false, wxString::Format( "Unable to find toolbar tool %s", item.m_ActionName ) ); + wxFAIL_MSG( wxString::Format( wxT( "Unable to find toolbar tool %s" ), item.m_ActionName ) ); continue; } diff --git a/common/widgets/wx_grid.cpp b/common/widgets/wx_grid.cpp index 9e713e46d6..28fe7ef04c 100644 --- a/common/widgets/wx_grid.cpp +++ b/common/widgets/wx_grid.cpp @@ -207,6 +207,10 @@ WX_GRID::WX_GRID( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxS wxGrid( parent, id, pos, size, style, name ), m_weOwnTable( false ) { + // Grids with comboboxes need a bit of extra height; other grids look better if they're + // consistent. + SetDefaultRowSize( GetDefaultRowSize() + FromDIP( 4 ) ); + SetDefaultCellOverflow( false ); // Make sure the GUI font scales properly @@ -214,10 +218,8 @@ WX_GRID::WX_GRID( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxS SetLabelFont( KIUI::GetControlFont( this ) ); Connect( wxEVT_DPI_CHANGED, wxDPIChangedEventHandler( WX_GRID::onDPIChanged ), nullptr, this ); - Connect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( WX_GRID::onCellEditorShown ), nullptr, - this ); - Connect( wxEVT_GRID_EDITOR_HIDDEN, wxGridEventHandler( WX_GRID::onCellEditorHidden ), nullptr, - this ); + Connect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( WX_GRID::onCellEditorShown ), nullptr, this ); + Connect( wxEVT_GRID_EDITOR_HIDDEN, wxGridEventHandler( WX_GRID::onCellEditorHidden ), nullptr, this ); } @@ -226,22 +228,18 @@ WX_GRID::~WX_GRID() if( m_weOwnTable ) DestroyTable( GetTable() ); - Disconnect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( WX_GRID::onCellEditorShown ), nullptr, - this ); - Disconnect( wxEVT_GRID_EDITOR_HIDDEN, wxGridEventHandler( WX_GRID::onCellEditorHidden ), - nullptr, this ); - Disconnect( wxEVT_DPI_CHANGED, wxDPIChangedEventHandler( WX_GRID::onDPIChanged ), nullptr, - this ); + Disconnect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( WX_GRID::onCellEditorShown ), nullptr, this ); + Disconnect( wxEVT_GRID_EDITOR_HIDDEN, wxGridEventHandler( WX_GRID::onCellEditorHidden ), nullptr, this ); + Disconnect( wxEVT_DPI_CHANGED, wxDPIChangedEventHandler( WX_GRID::onDPIChanged ), nullptr, this ); } void WX_GRID::onDPIChanged(wxDPIChangedEvent& aEvt) { - CallAfter( - [&]() - { - wxGrid::SetColLabelSize( wxGRID_AUTOSIZE ); - } ); + CallAfter( [&]() + { + wxGrid::SetColLabelSize( wxGRID_AUTOSIZE ); + } ); /// This terrible hack is a way to avoid the incredibly disruptive resizing of grids that /// happens on Macs when moving a window between monitors of different DPIs. @@ -301,8 +299,7 @@ void WX_GRID::SetTable( wxGridTableBase* aTable, bool aTakeOwnership ) EnableAlternateRowColors( Pgm().GetCommonSettings()->m_Appearance.grid_striping ); Connect( wxEVT_GRID_COL_MOVE, wxGridEventHandler( WX_GRID::onGridColMove ), nullptr, this ); - Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( WX_GRID::onGridCellSelect ), nullptr, - this ); + Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( WX_GRID::onGridCellSelect ), nullptr, this ); m_weOwnTable = aTakeOwnership; } @@ -391,11 +388,8 @@ void WX_GRID::onCellEditorHidden( wxGridEvent& aEvent ) if( cellEditor ) { - GRID_CELL_MARK_AS_NULLABLE* nullableCell = - dynamic_cast( cellEditor ); - - if( nullableCell ) - isNullable = nullableCell->IsNullable(); + if( GRID_CELL_MARK_AS_NULLABLE* nullable = dynamic_cast( cellEditor ) ) + isNullable = nullable->IsNullable(); cellEditor->DecRef(); } @@ -419,8 +413,8 @@ void WX_GRID::onCellEditorHidden( wxGridEvent& aEvent ) if( stringValue == UNITS_PROVIDER::NullUiString ) { - val = unitsProvider->OptionalValueFromString( - UNITS_PROVIDER::NullUiString, cellDataType ); + val = unitsProvider->OptionalValueFromString( UNITS_PROVIDER::NullUiString, + cellDataType ); } else { @@ -428,13 +422,11 @@ void WX_GRID::onCellEditorHidden( wxGridEvent& aEvent ) cellDataType ); } - evalValue = unitsProvider->StringFromOptionalValue( val, true, - cellDataType ); + evalValue = unitsProvider->StringFromOptionalValue( val, true, cellDataType ); } else { - int val = unitsProvider->ValueFromString( m_eval->Result(), - cellDataType ); + int val = unitsProvider->ValueFromString( m_eval->Result(), cellDataType ); evalValue = unitsProvider->StringFromValue( val, true, cellDataType ); } @@ -458,8 +450,7 @@ void WX_GRID::DestroyTable( wxGridTableBase* aTable ) CommitPendingChanges( true /* quiet mode */ ); Disconnect( wxEVT_GRID_COL_MOVE, wxGridEventHandler( WX_GRID::onGridColMove ), nullptr, this ); - Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( WX_GRID::onGridCellSelect ), nullptr, - this ); + Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( WX_GRID::onGridCellSelect ), nullptr, this ); wxGrid::SetTable( nullptr ); delete aTable; @@ -805,8 +796,7 @@ int WX_GRID::GetVisibleWidth( int aCol, bool aHeader, bool aContents, bool aKeep { EnsureColLabelsVisible(); - size = std::max( size, - int( GetTextExtent( GetColLabelValue( aCol ) + wxS( "M" ) ).x ) ); + size = std::max( size, int( GetTextExtent( GetColLabelValue( aCol ) + wxS( "M" ) ).x ) ); } for( int row = 0; aContents && row < GetNumberRows(); row++ ) diff --git a/eeschema/dialogs/dialog_change_symbols.cpp b/eeschema/dialogs/dialog_change_symbols.cpp index 575cc5a41b..f6f056bfda 100644 --- a/eeschema/dialogs/dialog_change_symbols.cpp +++ b/eeschema/dialogs/dialog_change_symbols.cpp @@ -854,7 +854,7 @@ wxString DIALOG_CHANGE_SYMBOLS::getSymbolReferences( SCH_SYMBOL& aSymbol, { wxString msg; wxString references; - LIB_ID oldId = aSymbol.GetLibId(); + const LIB_ID& oldId = aSymbol.GetLibId(); wxString oldLibLinkName; // For report diff --git a/eeschema/dialogs/dialog_change_symbols_base.cpp b/eeschema/dialogs/dialog_change_symbols_base.cpp index 6b82c72809..cdf3d48165 100644 --- a/eeschema/dialogs/dialog_change_symbols_base.cpp +++ b/eeschema/dialogs/dialog_change_symbols_base.cpp @@ -150,7 +150,7 @@ DIALOG_CHANGE_SYMBOLS_BASE::DIALOG_CHANGE_SYMBOLS_BASE( wxWindow* parent, wxWind bSizer8->Add( m_checkAll, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - m_updateOptionsSizer->Add( bSizer8, 0, wxEXPAND|wxRIGHT, 10 ); + m_updateOptionsSizer->Add( bSizer8, 1, wxEXPAND|wxRIGHT, 10 ); wxBoxSizer* bSizer9; bSizer9 = new wxBoxSizer( wxVERTICAL ); @@ -191,7 +191,7 @@ DIALOG_CHANGE_SYMBOLS_BASE::DIALOG_CHANGE_SYMBOLS_BASE( wxWindow* parent, wxWind bSizer9->Add( m_uncheckAll, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - m_updateOptionsSizer->Add( bSizer9, 0, wxEXPAND|wxLEFT, 5 ); + m_updateOptionsSizer->Add( bSizer9, 1, wxEXPAND, 5 ); bSizerUpdate->Add( m_updateOptionsSizer, 4, wxEXPAND|wxTOP|wxRIGHT, 10 ); diff --git a/eeschema/dialogs/dialog_change_symbols_base.fbp b/eeschema/dialogs/dialog_change_symbols_base.fbp index cb3bfddbde..4d09bb3c8d 100644 --- a/eeschema/dialogs/dialog_change_symbols_base.fbp +++ b/eeschema/dialogs/dialog_change_symbols_base.fbp @@ -1287,7 +1287,7 @@ 10 wxEXPAND|wxRIGHT - 0 + 1 bSizer8 @@ -1772,8 +1772,8 @@ 5 - wxEXPAND|wxLEFT - 0 + wxEXPAND + 1 bSizer9 diff --git a/eeschema/dialogs/dialog_label_properties.cpp b/eeschema/dialogs/dialog_label_properties.cpp index f67d88e604..ae8d153259 100644 --- a/eeschema/dialogs/dialog_label_properties.cpp +++ b/eeschema/dialogs/dialog_label_properties.cpp @@ -141,12 +141,9 @@ DIALOG_LABEL_PROPERTIES::DIALOG_LABEL_PROPERTIES( SCH_EDIT_FRAME* aParent, case SCH_LABEL_T: SetTitle( _( "Label Properties" ) ); break; case SCH_DIRECTIVE_LABEL_T: SetTitle( _( "Directive Label Properties" ) ); break; case SCH_SHEET_PIN_T: SetTitle( _( "Hierarchical Sheet Pin Properties" ) ); break; - default: UNIMPLEMENTED_FOR( m_currentLabel->GetClass() ); break; + default: UNIMPLEMENTED_FOR( m_currentLabel->GetClass() ); break; } - // Give a bit more room for combobox editors - m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() + 4 ); - m_grid->SetTable( m_fields ); m_grid->PushEventHandler( new FIELDS_GRID_TRICKS( m_grid, this, {}, [&]( wxCommandEvent& aEvent ) diff --git a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp index 3b2d592965..b3a86c83ef 100644 --- a/eeschema/dialogs/dialog_lib_edit_pin_table.cpp +++ b/eeschema/dialogs/dialog_lib_edit_pin_table.cpp @@ -1054,9 +1054,6 @@ DIALOG_LIB_EDIT_PIN_TABLE::DIALOG_LIB_EDIT_PIN_TABLE( SYMBOL_EDIT_FRAME* parent, for( int i = 0; i < COL_COUNT; ++i ) m_originalColWidths[ i ] = m_grid->GetColSize( i ); - // Give a bit more room for combobox editors - m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() + 4 ); - m_grid->SetTable( m_dataModel ); m_grid->PushEventHandler( new GRID_TRICKS( m_grid, [this]( wxCommandEvent& aEvent ) { diff --git a/eeschema/dialogs/dialog_lib_symbol_properties.cpp b/eeschema/dialogs/dialog_lib_symbol_properties.cpp index 8075667774..14c0f6eec1 100644 --- a/eeschema/dialogs/dialog_lib_symbol_properties.cpp +++ b/eeschema/dialogs/dialog_lib_symbol_properties.cpp @@ -58,22 +58,20 @@ DIALOG_LIB_SYMBOL_PROPERTIES::LAST_LAYOUT DIALOG_LIB_SYMBOL_PROPERTIES::m_lastLa DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES( SYMBOL_EDIT_FRAME* aParent, LIB_SYMBOL* aLibEntry ) : - DIALOG_LIB_SYMBOL_PROPERTIES_BASE( aParent ), - m_Parent( aParent ), - m_libEntry( aLibEntry ), - m_pinNameOffset( aParent, m_nameOffsetLabel, m_nameOffsetCtrl, m_nameOffsetUnits, true ), - m_delayedFocusCtrl( nullptr ), - m_delayedFocusGrid( nullptr ), - m_delayedFocusRow( -1 ), - m_delayedFocusColumn( -1 ), - m_delayedFocusPage( -1 ), - m_fpFilterTricks( std::make_unique( *this, *m_FootprintFilterListBox ) ) + DIALOG_LIB_SYMBOL_PROPERTIES_BASE( aParent ), + m_Parent( aParent ), + m_libEntry( aLibEntry ), + m_pinNameOffset( aParent, m_nameOffsetLabel, m_nameOffsetCtrl, m_nameOffsetUnits, true ), + m_delayedFocusCtrl( nullptr ), + m_delayedFocusGrid( nullptr ), + m_delayedFocusRow( -1 ), + m_delayedFocusColumn( -1 ), + m_delayedFocusPage( -1 ), + m_fpFilterTricks( std::make_unique( *this, *m_FootprintFilterListBox ) ) { m_embeddedFiles = new PANEL_EMBEDDED_FILES( m_NoteBook, m_libEntry ); m_NoteBook->AddPage( m_embeddedFiles, _( "Embedded Files" ) ); - // Give a bit more room for combobox editors - m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() + 4 ); m_fields = new FIELDS_GRID_TABLE( this, aParent, m_grid, m_libEntry, { m_embeddedFiles->GetLocalFiles() } ); m_grid->SetTable( m_fields ); @@ -116,8 +114,7 @@ DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES( SYMBOL_EDIT_FRAME* a // wxFormBuilder doesn't include this event... m_grid->Connect( wxEVT_GRID_CELL_CHANGING, - wxGridEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES::OnGridCellChanging ), - nullptr, this ); + wxGridEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES::OnGridCellChanging ), nullptr, this ); // Forward the delete button to the tricks m_deleteFilterButton->Bind( wxEVT_BUTTON, @@ -167,8 +164,7 @@ DIALOG_LIB_SYMBOL_PROPERTIES::~DIALOG_LIB_SYMBOL_PROPERTIES() m_grid->DestroyTable( m_fields ); m_grid->Disconnect( wxEVT_GRID_CELL_CHANGING, - wxGridEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES::OnGridCellChanging ), - nullptr, this ); + wxGridEventHandler( DIALOG_LIB_SYMBOL_PROPERTIES::OnGridCellChanging ), nullptr, this ); // Delete the GRID_TRICKS. m_grid->PopEventHandler( true ); @@ -224,8 +220,7 @@ bool DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataToWindow() m_KeywordCtrl->ChangeValue( m_libEntry->GetKeyWords() ); m_SelNumberOfUnits->SetValue( m_libEntry->GetUnitCount() ); - m_OptionPartsInterchangeable->SetValue( !m_libEntry->UnitsLocked() || - m_libEntry->GetUnitCount() == 1 ); + m_OptionPartsInterchangeable->SetValue( !m_libEntry->UnitsLocked() || m_libEntry->GetUnitCount() == 1 ); // If a symbol contains no body-style-specific pins or graphic items, // symbol->HasAlternateBodyStyle() will return false. @@ -513,8 +508,7 @@ bool DIALOG_LIB_SYMBOL_PROPERTIES::TransferDataFromWindow() m_libEntry->SetName( newName ); m_libEntry->SetKeyWords( m_KeywordCtrl->GetValue() ); m_libEntry->SetUnitCount( m_SelNumberOfUnits->GetValue() ); - m_libEntry->LockUnits( m_libEntry->GetUnitCount() > 1 && - !m_OptionPartsInterchangeable->GetValue() ); + m_libEntry->LockUnits( m_libEntry->GetUnitCount() > 1 && !m_OptionPartsInterchangeable->GetValue() ); m_libEntry->SetHasAlternateBodyStyle( m_hasAlternateBodyStyles->GetValue() ); m_Parent->SetShowDeMorgan( m_hasAlternateBodyStyles->GetValue() ); @@ -608,8 +602,7 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnGridCellChanging( wxGridEvent& event ) if( newName.CmpNoCase( m_grid->GetCellValue( i, FDC_NAME ) ) == 0 ) { - DisplayError( this, wxString::Format( _( "The name '%s' is already in use." ), - newName ) ); + DisplayError( this, wxString::Format( _( "The name '%s' is already in use." ), newName ) ); event.Veto(); m_delayedFocusRow = event.GetRow(); m_delayedFocusColumn = event.GetCol(); @@ -624,10 +617,7 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnGridCellChanging( wxGridEvent& event ) void DIALOG_LIB_SYMBOL_PROPERTIES::OnSymbolNameText( wxCommandEvent& event ) { if( m_OptionPower->IsChecked() ) - { - m_grid->SetCellValue( m_fields->GetFieldRow( FIELD_T::VALUE ), FDC_VALUE, - m_SymbolNameCtrl->GetValue() ); - } + m_grid->SetCellValue( m_fields->GetFieldRow( FIELD_T::VALUE ), FDC_VALUE, m_SymbolNameCtrl->GetValue() ); OnModify(); } @@ -660,8 +650,7 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnAddField( wxCommandEvent& event ) return; SYMBOL_EDITOR_SETTINGS* settings = m_Parent->GetSettings(); - SCH_FIELD newField( m_libEntry, FIELD_T::USER, - GetUserFieldName( m_fields->size(), DO_TRANSLATE ) ); + SCH_FIELD newField( m_libEntry, FIELD_T::USER, GetUserFieldName( m_fields->size(), DO_TRANSLATE ) ); newField.SetTextSize( VECTOR2I( schIUScale.MilsToIU( settings->m_Defaults.text_size ), schIUScale.MilsToIU( settings->m_Defaults.text_size ) ) ); @@ -936,8 +925,7 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event ) int row = m_grid->GetGridCursorRow(); int col = m_grid->GetGridCursorCol(); - if( row == m_fields->GetFieldRow( FIELD_T::VALUE ) && col == FDC_VALUE - && m_OptionPower->IsChecked() ) + if( row == m_fields->GetFieldRow( FIELD_T::VALUE ) && col == FDC_VALUE && m_OptionPower->IsChecked() ) { wxGridCellEditor* editor = m_grid->GetCellEditor( row, col ); m_SymbolNameCtrl->ChangeValue( editor->GetValue() ); @@ -982,7 +970,7 @@ void DIALOG_LIB_SYMBOL_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event ) { m_delayedFocusCtrl->SetFocus(); - if( auto textEntry = dynamic_cast( m_delayedFocusCtrl ) ) + if( wxTextEntry* textEntry = dynamic_cast( m_delayedFocusCtrl ) ) textEntry->SelectAll(); m_delayedFocusCtrl = nullptr; diff --git a/eeschema/dialogs/dialog_pin_properties.cpp b/eeschema/dialogs/dialog_pin_properties.cpp index 95216278f0..407ea08ad8 100644 --- a/eeschema/dialogs/dialog_pin_properties.cpp +++ b/eeschema/dialogs/dialog_pin_properties.cpp @@ -126,17 +126,17 @@ public: DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES( SYMBOL_EDIT_FRAME* parent, SCH_PIN* aPin, bool aFocusPinNumber ) : - DIALOG_PIN_PROPERTIES_BASE( parent ), - m_frame( parent ), - m_pin( aPin ), - m_posX( parent, m_posXLabel, m_posXCtrl, m_posXUnits ), - m_posY( parent, m_posYLabel, m_posYCtrl, m_posYUnits ), - m_pinLength( parent, m_pinLengthLabel, m_pinLengthCtrl, m_pinLengthUnits ), - m_nameSize( parent, m_nameSizeLabel, m_nameSizeCtrl, m_nameSizeUnits ), - m_numberSize( parent, m_numberSizeLabel, m_numberSizeCtrl, m_numberSizeUnits ), - m_delayedFocusRow( -1 ), - m_delayedFocusColumn( -1 ), - m_initialized( false ) + DIALOG_PIN_PROPERTIES_BASE( parent ), + m_frame( parent ), + m_pin( aPin ), + m_posX( parent, m_posXLabel, m_posXCtrl, m_posXUnits ), + m_posY( parent, m_posYLabel, m_posYCtrl, m_posYUnits ), + m_pinLength( parent, m_pinLengthLabel, m_pinLengthCtrl, m_pinLengthUnits ), + m_nameSize( parent, m_nameSizeLabel, m_nameSizeCtrl, m_nameSizeUnits ), + m_numberSize( parent, m_numberSizeLabel, m_numberSizeCtrl, m_numberSizeUnits ), + m_delayedFocusRow( -1 ), + m_delayedFocusColumn( -1 ), + m_initialized( false ) { // Create a dummy symbol with a single pin for the preview widget: m_dummyParent = new LIB_SYMBOL( *static_cast( m_pin->GetParentSymbol() ) ); @@ -170,10 +170,7 @@ DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES( SYMBOL_EDIT_FRAME* parent, SCH_PIN const std::vector& orientationIcons = PinOrientationIcons(); for ( unsigned ii = 0; ii < orientationNames.GetCount(); ii++ ) - { - m_choiceOrientation->Insert( orientationNames[ii], KiBitmapBundle( orientationIcons[ii] ), - ii ); - } + m_choiceOrientation->Insert( orientationNames[ii], KiBitmapBundle( orientationIcons[ii] ), ii ); // We can't set the tab order through wxWidgets due to shortcomings in their mnemonics // implementation on MSW @@ -197,8 +194,7 @@ DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES( SYMBOL_EDIT_FRAME* parent, SCH_PIN // Default alternates turndown to whether or not alternates exist, or if we've had it open // before - m_alternatesTurndown->Collapse( m_pin->GetAlternates().size() == 0 - && !s_alternatesTurndownOpen ); + m_alternatesTurndown->Collapse( m_pin->GetAlternates().size() == 0 && !s_alternatesTurndownOpen ); // wxwidgets doesn't call the OnCollapseChange even at init, so we update this value if // the alternates pane defaults to open @@ -211,9 +207,6 @@ DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES( SYMBOL_EDIT_FRAME* parent, SCH_PIN for( int i = 0; i < COL_COUNT; ++i ) m_originalColWidths[ i ] = m_alternatesGrid->GetColSize( i ); - // Give a bit more room for combobox editors - m_alternatesGrid->SetDefaultRowSize( m_alternatesGrid->GetDefaultRowSize() + 4 ); - m_alternatesGrid->SetTable( m_alternatesDataModel ); m_alternatesGrid->PushEventHandler( new GRID_TRICKS( m_alternatesGrid, [this]( wxCommandEvent& aEvent ) @@ -291,8 +284,7 @@ bool DIALOG_PIN_PROPERTIES::TransferDataToWindow() m_numberSize.SetValue( m_pin->GetNumberTextSize() ); m_pinLength.SetValue( m_pin->GetLength() ); m_checkApplyToAllParts->Enable( m_pin->GetParentSymbol()->IsMulti() ); - m_checkApplyToAllParts->SetValue( m_pin->GetParentSymbol()->IsMulti() - && m_pin->GetUnit() == 0 ); + m_checkApplyToAllParts->SetValue( m_pin->GetParentSymbol()->IsMulti() && m_pin->GetUnit() == 0 ); m_checkApplyToAllBodyStyles->SetValue( m_pin->GetBodyStyle() == 0 ); m_checkShow->SetValue( m_pin->IsVisible() ); @@ -302,8 +294,7 @@ bool DIALOG_PIN_PROPERTIES::TransferDataToWindow() if( m_frame->m_SyncPinEdit ) { - wxHyperlinkCtrl* button = new wxHyperlinkCtrl( m_infoBar, wxID_ANY, - _( "Exit sync pins mode" ), + wxHyperlinkCtrl* button = new wxHyperlinkCtrl( m_infoBar, wxID_ANY, _( "Exit sync pins mode" ), wxEmptyString ); button->Bind( wxEVT_COMMAND_HYPERLINK, @@ -483,8 +474,7 @@ void DIALOG_PIN_PROPERTIES::adjustGridColumns() m_alternatesGrid->SetColSize( COL_TYPE, m_originalColWidths[COL_TYPE] ); m_alternatesGrid->SetColSize( COL_SHAPE, m_originalColWidths[COL_SHAPE] ); - m_alternatesGrid->SetColSize( COL_NAME, width - m_originalColWidths[COL_TYPE] - - m_originalColWidths[COL_SHAPE] ); + m_alternatesGrid->SetColSize( COL_NAME, width - m_originalColWidths[COL_TYPE] - m_originalColWidths[COL_SHAPE] ); } diff --git a/eeschema/dialogs/dialog_plot_schematic.cpp b/eeschema/dialogs/dialog_plot_schematic.cpp index 4c442f1ed0..da496091e8 100644 --- a/eeschema/dialogs/dialog_plot_schematic.cpp +++ b/eeschema/dialogs/dialog_plot_schematic.cpp @@ -432,7 +432,7 @@ void DIALOG_PLOT_SCHEMATIC::plotSchematic( bool aPlotAll ) plotOpts.m_PDFMetadata = m_plotPDFMetadata->GetValue(); plotOpts.m_outputDirectory = getOutputPath(); plotOpts.m_pageSizeSelect = m_pageSizeSelect; - plotOpts.m_plotHopOver = cfg ? cfg->m_Appearance.show_hop_over : false; + plotOpts.m_plotHopOver = m_editFrame->Schematic().Settings().m_HopOverScale > 0.0; schPlotter->Plot( GetPlotFileFormat(), plotOpts, &renderSettings, &m_MessagesBox->Reporter() ); diff --git a/eeschema/dialogs/dialog_sheet_properties.cpp b/eeschema/dialogs/dialog_sheet_properties.cpp index 5f0a68f4b9..4ef5c2060f 100644 --- a/eeschema/dialogs/dialog_sheet_properties.cpp +++ b/eeschema/dialogs/dialog_sheet_properties.cpp @@ -53,24 +53,21 @@ DIALOG_SHEET_PROPERTIES::DIALOG_SHEET_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_S bool* aIsUndoable, bool* aClearAnnotationNewItems, bool* aUpdateHierarchyNavigator, wxString* aSourceSheetFilename ) : - DIALOG_SHEET_PROPERTIES_BASE( aParent ), - m_frame( aParent ), - m_isUndoable( aIsUndoable ), - m_clearAnnotationNewItems( aClearAnnotationNewItems ), - m_updateHierarchyNavigator( aUpdateHierarchyNavigator ), - m_sourceSheetFilename( aSourceSheetFilename ), - m_borderWidth( aParent, m_borderWidthLabel, m_borderWidthCtrl, m_borderWidthUnits ), - m_dummySheet( *aSheet ), - m_dummySheetNameField( &m_dummySheet, FIELD_T::SHEET_NAME ) + DIALOG_SHEET_PROPERTIES_BASE( aParent ), + m_frame( aParent ), + m_isUndoable( aIsUndoable ), + m_clearAnnotationNewItems( aClearAnnotationNewItems ), + m_updateHierarchyNavigator( aUpdateHierarchyNavigator ), + m_sourceSheetFilename( aSourceSheetFilename ), + m_borderWidth( aParent, m_borderWidthLabel, m_borderWidthCtrl, m_borderWidthUnits ), + m_dummySheet( *aSheet ), + m_dummySheetNameField( &m_dummySheet, FIELD_T::SHEET_NAME ) { m_sheet = aSheet; m_fields = new FIELDS_GRID_TABLE( this, aParent, m_grid, m_sheet ); m_delayedFocusRow = 0; m_delayedFocusColumn = FDC_VALUE; - // Give a bit more room for combobox editors - m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() + 4 ); - m_grid->SetTable( m_fields ); m_grid->PushEventHandler( new FIELDS_GRID_TRICKS( m_grid, this, { &aParent->Schematic() }, [&]( wxCommandEvent& aEvent ) diff --git a/eeschema/dialogs/dialog_symbol_fields_table.cpp b/eeschema/dialogs/dialog_symbol_fields_table.cpp index 55865e47d5..e04bfbaf7b 100644 --- a/eeschema/dialogs/dialog_symbol_fields_table.cpp +++ b/eeschema/dialogs/dialog_symbol_fields_table.cpp @@ -282,9 +282,6 @@ DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent, m_grid->PushEventHandler( new FIELDS_EDITOR_GRID_TRICKS( this, m_grid, m_fieldsCtrl, m_dataModel, &m_parent->Schematic() ) ); - // give a bit more room for comboboxes - m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() + 4 ); - // Load our BOM view presets SetUserBomPresets( m_schSettings.m_BomPresets ); diff --git a/eeschema/dialogs/dialog_symbol_properties.cpp b/eeschema/dialogs/dialog_symbol_properties.cpp index a33b9c5149..eba8d836ce 100644 --- a/eeschema/dialogs/dialog_symbol_properties.cpp +++ b/eeschema/dialogs/dialog_symbol_properties.cpp @@ -329,10 +329,6 @@ DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES( SCH_EDIT_FRAME* aParent, m_fields = new FIELDS_GRID_TABLE( this, aParent, m_fieldsGrid, m_symbol ); - // Give a bit more room for combobox editors - m_fieldsGrid->SetDefaultRowSize( m_fieldsGrid->GetDefaultRowSize() + 4 ); - m_pinGrid->SetDefaultRowSize( m_pinGrid->GetDefaultRowSize() + 4 ); - m_fieldsGrid->SetTable( m_fields ); m_fieldsGrid->PushEventHandler( new FIELDS_GRID_TRICKS( m_fieldsGrid, this, { &aParent->Schematic(), m_part }, diff --git a/eeschema/dialogs/dialog_user_defined_signals.cpp b/eeschema/dialogs/dialog_user_defined_signals.cpp index 698f27e4be..c9d8618f63 100644 --- a/eeschema/dialogs/dialog_user_defined_signals.cpp +++ b/eeschema/dialogs/dialog_user_defined_signals.cpp @@ -40,10 +40,6 @@ DIALOG_USER_DEFINED_SIGNALS::DIALOG_USER_DEFINED_SIGNALS( SIMULATOR_FRAME* aPare { m_grid->PushEventHandler( new GRID_TRICKS( m_grid ) ); - // Give a little more room for Scintilla text editor (which otherwise likes to scroll - // on every other keystroke). - m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() + 4 ); - wxGridCellAttr* attr = new wxGridCellAttr; attr->SetReadOnly(); m_grid->SetColAttr( 1, attr ); diff --git a/eeschema/dialogs/panel_eeschema_display_options.cpp b/eeschema/dialogs/panel_eeschema_display_options.cpp index 5a4831bb97..e23bb63645 100644 --- a/eeschema/dialogs/panel_eeschema_display_options.cpp +++ b/eeschema/dialogs/panel_eeschema_display_options.cpp @@ -62,7 +62,6 @@ void PANEL_EESCHEMA_DISPLAY_OPTIONS::loadEEschemaSettings( EESCHEMA_SETTINGS* cf m_checkShowOPVoltages->SetValue( cfg->m_Appearance.show_op_voltages ); m_checkShowPinAltModeIcons->SetValue( cfg->m_Appearance.show_op_currents ); m_checkPageLimits->SetValue( cfg->m_Appearance.show_page_limits ); - m_cbHopOver->SetValue( cfg->m_Appearance.show_hop_over ); m_checkSelDrawChildItems->SetValue( cfg->m_Selection.draw_selected_children ); m_checkSelFillShapes->SetValue( cfg->m_Selection.fill_shapes ); @@ -91,34 +90,33 @@ bool PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow() { if( EESCHEMA_SETTINGS* cfg = GetAppSettings( "eeschema" ) ) { - cfg->m_Appearance.default_font = m_defaultFontCtrl->GetSelection() <= 0 - // This is a keyword. Do not translate. - ? wxString( KICAD_FONT_NAME ) - : m_defaultFontCtrl->GetStringSelection(); - cfg->m_Appearance.show_hidden_pins = m_checkShowHiddenPins->GetValue(); - cfg->m_Appearance.show_hidden_fields = m_checkShowHiddenFields->GetValue(); - cfg->m_Appearance.show_erc_warnings = m_checkShowERCWarnings->GetValue(); - cfg->m_Appearance.show_erc_errors = m_checkShowERCErrors->GetValue(); - cfg->m_Appearance.show_erc_exclusions = m_checkShowERCExclusions->GetValue(); - cfg->m_Appearance.mark_sim_exclusions = m_cbMarkSimExclusions->GetValue(); - cfg->m_Appearance.show_op_voltages = m_checkShowOPVoltages->GetValue(); - cfg->m_Appearance.show_op_currents = m_checkShowOPCurrents->GetValue(); - cfg->m_Appearance.show_pin_alt_icons = m_checkShowPinAltModeIcons->GetValue(); - cfg->m_Appearance.show_page_limits = m_checkPageLimits->GetValue(); - cfg->m_Appearance.show_hop_over = m_cbHopOver->GetValue(); + cfg->m_Appearance.default_font = m_defaultFontCtrl->GetSelection() <= 0 + // This is a keyword. Do not translate. + ? wxString( KICAD_FONT_NAME ) + : m_defaultFontCtrl->GetStringSelection(); + cfg->m_Appearance.show_hidden_pins = m_checkShowHiddenPins->GetValue(); + cfg->m_Appearance.show_hidden_fields = m_checkShowHiddenFields->GetValue(); + cfg->m_Appearance.show_erc_warnings = m_checkShowERCWarnings->GetValue(); + cfg->m_Appearance.show_erc_errors = m_checkShowERCErrors->GetValue(); + cfg->m_Appearance.show_erc_exclusions = m_checkShowERCExclusions->GetValue(); + cfg->m_Appearance.mark_sim_exclusions = m_cbMarkSimExclusions->GetValue(); + cfg->m_Appearance.show_op_voltages = m_checkShowOPVoltages->GetValue(); + cfg->m_Appearance.show_op_currents = m_checkShowOPCurrents->GetValue(); + cfg->m_Appearance.show_pin_alt_icons = m_checkShowPinAltModeIcons->GetValue(); + cfg->m_Appearance.show_page_limits = m_checkPageLimits->GetValue(); - cfg->m_Selection.draw_selected_children = m_checkSelDrawChildItems->GetValue(); - cfg->m_Selection.fill_shapes = m_checkSelFillShapes->GetValue(); - cfg->m_Selection.selection_thickness = KiROUND( m_selWidthCtrl->GetValue() ); - cfg->m_Selection.highlight_thickness = KiROUND( m_highlightWidthCtrl->GetValue() ); - cfg->m_Selection.highlight_netclass_colors = m_highlightNetclassColors->GetValue(); - cfg->m_Selection.highlight_netclass_colors_thickness = m_colHighlightThickness->GetValue(); + cfg->m_Selection.draw_selected_children = m_checkSelDrawChildItems->GetValue(); + cfg->m_Selection.fill_shapes = m_checkSelFillShapes->GetValue(); + cfg->m_Selection.selection_thickness = KiROUND( m_selWidthCtrl->GetValue() ); + cfg->m_Selection.highlight_thickness = KiROUND( m_highlightWidthCtrl->GetValue() ); + cfg->m_Selection.highlight_netclass_colors = m_highlightNetclassColors->GetValue(); + cfg->m_Selection.highlight_netclass_colors_thickness = m_colHighlightThickness->GetValue(); cfg->m_Selection.highlight_netclass_colors_alpha = m_colHighlightTransparency->GetValue() / 100.0; - cfg->m_CrossProbing.on_selection = m_checkCrossProbeOnSelection->GetValue(); - cfg->m_CrossProbing.center_on_items = m_checkCrossProbeCenter->GetValue(); - cfg->m_CrossProbing.zoom_to_fit = m_checkCrossProbeZoom->GetValue(); - cfg->m_CrossProbing.auto_highlight = m_checkCrossProbeAutoHighlight->GetValue(); + cfg->m_CrossProbing.on_selection = m_checkCrossProbeOnSelection->GetValue(); + cfg->m_CrossProbing.center_on_items = m_checkCrossProbeCenter->GetValue(); + cfg->m_CrossProbing.zoom_to_fit = m_checkCrossProbeZoom->GetValue(); + cfg->m_CrossProbing.auto_highlight = m_checkCrossProbeAutoHighlight->GetValue(); } m_galOptsPanel->TransferDataFromWindow(); diff --git a/eeschema/dialogs/panel_eeschema_display_options_base.cpp b/eeschema/dialogs/panel_eeschema_display_options_base.cpp index b46257895b..08dd32d47a 100644 --- a/eeschema/dialogs/panel_eeschema_display_options_base.cpp +++ b/eeschema/dialogs/panel_eeschema_display_options_base.cpp @@ -135,11 +135,6 @@ PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE::PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE( wxWind m_checkPageLimits->SetValue(true); bAppearanceSizer->Add( m_checkPageLimits, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_cbHopOver = new wxCheckBox( this, wxID_ANY, _("Hop hover on wire crossing"), wxDefaultPosition, wxDefaultSize, 0 ); - m_cbHopOver->SetToolTip( _("Show a hop hover when two wires are crossing") ); - - bAppearanceSizer->Add( m_cbHopOver, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - bRightColumn->Add( bAppearanceSizer, 0, wxEXPAND|wxTOP|wxLEFT, 5 ); diff --git a/eeschema/dialogs/panel_eeschema_display_options_base.fbp b/eeschema/dialogs/panel_eeschema_display_options_base.fbp index 189048b51f..26bc72dc79 100644 --- a/eeschema/dialogs/panel_eeschema_display_options_base.fbp +++ b/eeschema/dialogs/panel_eeschema_display_options_base.fbp @@ -1432,71 +1432,6 @@ - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Hop hover on wire crossing - - 0 - - - 0 - - 1 - m_cbHopOver - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - Show a hop hover when two wires are crossing - - wxFILTER_NONE - wxDefaultValidator - - - - - - diff --git a/eeschema/dialogs/panel_eeschema_display_options_base.h b/eeschema/dialogs/panel_eeschema_display_options_base.h index 8b32f120a1..9cee0d27a5 100644 --- a/eeschema/dialogs/panel_eeschema_display_options_base.h +++ b/eeschema/dialogs/panel_eeschema_display_options_base.h @@ -58,7 +58,6 @@ class PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE : public RESETTABLE_PANEL wxCheckBox* m_checkShowOPCurrents; wxCheckBox* m_checkShowPinAltModeIcons; wxCheckBox* m_checkPageLimits; - wxCheckBox* m_cbHopOver; wxStaticText* m_selectionLabel; wxStaticLine* m_staticline2; wxCheckBox* m_checkSelDrawChildItems; diff --git a/eeschema/dialogs/panel_setup_formatting.cpp b/eeschema/dialogs/panel_setup_formatting.cpp index 531fff07b9..2b0218f632 100644 --- a/eeschema/dialogs/panel_setup_formatting.cpp +++ b/eeschema/dialogs/panel_setup_formatting.cpp @@ -95,6 +95,7 @@ bool PANEL_SETUP_FORMATTING::TransferDataToWindow() m_lineWidth.SetValue( settings.m_DefaultLineWidth ); m_pinSymbolSize.SetValue( settings.m_PinSymbolSize ); m_choiceJunctionDotSize->SetSelection( settings.m_JunctionSizeChoice ); + m_choiceHopOverSize->SetSelection( settings.m_HopOverSizeChoice ); m_connectionGridSize.SetValue( settings.m_ConnectionGridSize ); m_showIntersheetsReferences->SetValue( settings.m_IntersheetRefsShow ); @@ -162,6 +163,9 @@ bool PANEL_SETUP_FORMATTING::TransferDataFromWindow() if( m_choiceJunctionDotSize->GetSelection() != wxNOT_FOUND ) settings.m_JunctionSizeChoice = m_choiceJunctionDotSize->GetSelection(); + if( m_choiceHopOverSize->GetSelection() != wxNOT_FOUND ) + settings.m_HopOverSizeChoice = m_choiceHopOverSize->GetSelection(); + settings.m_IntersheetRefsShow = m_showIntersheetsReferences->GetValue(); settings.m_IntersheetRefsFormatShort = !m_radioFormatStandard->GetValue(); settings.m_IntersheetRefsPrefix = m_prefixCtrl->GetValue(); diff --git a/eeschema/dialogs/panel_setup_formatting_base.cpp b/eeschema/dialogs/panel_setup_formatting_base.cpp index 9c089aeb43..65bdb60f19 100644 --- a/eeschema/dialogs/panel_setup_formatting_base.cpp +++ b/eeschema/dialogs/panel_setup_formatting_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -155,9 +155,9 @@ PANEL_SETUP_FORMATTING_BASE::PANEL_SETUP_FORMATTING_BASE( wxWindow* parent, wxWi gbSizer1->SetFlexibleDirection( wxBOTH ); gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_staticText261 = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Junction dot size:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText261->Wrap( -1 ); - gbSizer1->Add( m_staticText261, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + m_junctionDotLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Junction dot size:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_junctionDotLabel->Wrap( -1 ); + gbSizer1->Add( m_junctionDotLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); wxString m_choiceJunctionDotSizeChoices[] = { _("None"), _("Smallest"), _("Small"), _("Default"), _("Large"), _("Largest") }; int m_choiceJunctionDotSizeNChoices = sizeof( m_choiceJunctionDotSizeChoices ) / sizeof( wxString ); @@ -165,16 +165,26 @@ PANEL_SETUP_FORMATTING_BASE::PANEL_SETUP_FORMATTING_BASE( wxWindow* parent, wxWi m_choiceJunctionDotSize->SetSelection( 3 ); gbSizer1->Add( m_choiceJunctionDotSize, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_hopOverLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Hop-over size:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_hopOverLabel->Wrap( -1 ); + gbSizer1->Add( m_hopOverLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + + wxString m_choiceHopOverSizeChoices[] = { _("None"), _("Smallest"), _("Small"), _("Medium"), _("Large"), _("Largest") }; + int m_choiceHopOverSizeNChoices = sizeof( m_choiceHopOverSizeChoices ) / sizeof( wxString ); + m_choiceHopOverSize = new wxChoice( sbSizer2->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceHopOverSizeNChoices, m_choiceHopOverSizeChoices, 0 ); + m_choiceHopOverSize->SetSelection( 0 ); + gbSizer1->Add( m_choiceHopOverSize, wxGBPosition( 1, 1 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + m_connectionGridLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Connection grid:"), wxDefaultPosition, wxDefaultSize, 0 ); m_connectionGridLabel->Wrap( -1 ); - gbSizer1->Add( m_connectionGridLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_connectionGridLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); m_connectionGridCtrl = new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - gbSizer1->Add( m_connectionGridCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + gbSizer1->Add( m_connectionGridCtrl, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_connectionGridUnits = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); m_connectionGridUnits->Wrap( -1 ); - gbSizer1->Add( m_connectionGridUnits, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_connectionGridUnits, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); gbSizer1->AddGrowableCol( 1 ); diff --git a/eeschema/dialogs/panel_setup_formatting_base.fbp b/eeschema/dialogs/panel_setup_formatting_base.fbp index 950e56fd95..0abb43825d 100644 --- a/eeschema/dialogs/panel_setup_formatting_base.fbp +++ b/eeschema/dialogs/panel_setup_formatting_base.fbp @@ -1,3193 +1,3375 @@ - + - - - - C++ - 1 - source_name - 0 - 0 - res - UTF-8 - table - panel_setup_formatting_base - 1000 - none - - - 1 - PanelSetupFormatting - - . - - 1 - 1 - 1 - 1 - UI - 0 - 1 - 0 - - 0 - wxAUI_MGR_DEFAULT - - - 1 - 1 - impl_virtual - - - 0 - wxID_ANY - + + + C++ + + 1 + table + none + + + 0 + 1 + res + UTF-8 + panel_setup_formatting_base + 1000 + 1 + 1 + UI + PanelSetupFormatting + . + 0 + source_name + 1 + 0 + source_name + + + 1 + 1 + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + 1 + 0 + 1 + impl_virtual + + + 0 + wxID_ANY + + + PANEL_SETUP_FORMATTING_BASE + + -1,-1 + ; forward_declare + + 0 + + + wxTAB_TRAVERSAL + + + bPanelSizer + wxHORIZONTAL + none + + 5 + wxEXPAND|wxBOTTOM|wxLEFT + 1 + - PANEL_SETUP_FORMATTING_BASE - - -1,-1 - ; forward_declare - - 0 - - - wxTAB_TRAVERSAL - + bLeftColumn + wxVERTICAL + none + + 5 + wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT + 0 + + wxID_ANY + Annotations - bPanelSizer - wxHORIZONTAL + sbSizer1 + wxVERTICAL + 1 none - - 5 - wxEXPAND|wxBOTTOM|wxLEFT - 1 - + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT + 0 + + + bSizer6 + wxHORIZONTAL + none + + 5 + wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Symbol unit notation: + 0 + + 0 + + + 0 - bLeftColumn - wxVERTICAL - none - - 5 - wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT - 0 - - wxID_ANY - Annotations - - sbSizer1 - wxVERTICAL - 1 - none - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT - 0 - - - bSizer6 - wxHORIZONTAL - none - - 5 - wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Symbol unit notation: - 0 - - 0 - - - 0 - - 1 - m_staticText26 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxEXPAND|wxRIGHT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "A" ".A" "-A" "_A" ".1" "-1" "_1" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_choiceSeparatorRefId - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT - 0 - - wxID_ANY - Text - - sbSizer4 - wxVERTICAL - 1 - none - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 1 - - 3 - wxHORIZONTAL - 1 - - 5 - - fgSizer2 - wxFLEX_GROWMODE_NONE - none - 0 - 5 - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Default text size: - 0 - - 0 - - - 0 - - 1 - m_textSizeLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_textSizeCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - mils - 0 - - 0 - - - 0 - - 1 - m_textSizeUnits - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Overbar offset ratio: - 0 - - 0 - - - 0 - - 1 - m_overbarHieghtLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_overbarHeightCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - % - 0 - - 0 - - - 0 - - 1 - m_overbarHeightUnits - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Label offset ratio: - 0 - - 0 - - - 0 - - 1 - m_textOffsetRatioLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - Percentage of the text size to offset labels above (or below) a wire, bus, or pin - - - - -1 - - - - 5 - wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_textOffsetRatioCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - Percentage of the text size to offset labels above (or below) a wire, bus, or pin - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - % - 0 - - 0 - - - 0 - - 1 - m_offsetRatioUnits - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Global label margin ratio: - 0 - - 0 - - - 0 - - 1 - m_labelSizeRatioLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - Percentage of the text size to use as space around a global label - - - - -1 - - - - 5 - wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_labelSizeRatioCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - Percentage of the text size to use as space around a global label - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - % - 0 - - 0 - - - 0 - - 1 - m_labelSizeRatioUnits - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - - - - - 5 - wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT - 0 - - wxID_ANY - Symbols - - sbSizer41 - wxVERTICAL - 1 - none - - 5 - wxEXPAND|wxBOTTOM - 1 - - 3 - wxBOTH - 1 - - 0 - -1,-1 - fgSizer321 - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 5 - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Default line width: - 0 - - 0 - - - 0 - - 1 - m_lineWidthLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_lineWidthCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - mils - 0 - - 0 - - - 0 - - 1 - m_lineWidthUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Pin symbol size: - 0 - - 0 - - - 0 - - 1 - m_pinSymbolSizeLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxEXPAND|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_pinSymbolSizeCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - mils - 0 - - 0 - - - 0 - - 1 - m_pinSymbolSizeUnits - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - - - - - 5 - wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT - 1 - - wxID_ANY - Connections - - sbSizer2 - wxVERTICAL - 1 - none - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 1 - - - wxBOTH - 1 - - 5 - - gbSizer1 - wxFLEX_GROWMODE_SPECIFIED - none - 5 - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL - 0 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Junction dot size: - 0 - - 0 - - - 0 - - 1 - m_staticText261 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - 5 - 2 - 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "None" "Smallest" "Small" "Default" "Large" "Largest" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_choiceJunctionDotSize - 1 - - - protected - 1 - - Resizable - 3 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL - 1 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Connection grid: - 0 - - 0 - - - 0 - - 1 - m_connectionGridLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - 1 - 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 1 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_connectionGridCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - 1 - 2 - wxALIGN_CENTER_VERTICAL - 1 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - mils - 0 - - 0 - - - 0 - - 1 - m_connectionGridUnits - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - - - + 1 + m_staticText26 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 1 - + + 5 + wxEXPAND|wxRIGHT + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + "A" ".A" "-A" "_A" ".1" "-1" "_1" + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 - bRightColumn - wxVERTICAL - none - - 5 - wxALL|wxEXPAND - 0 - - wxID_ANY - Inter-sheet References - - sbSizerIREf - wxVERTICAL - 1 - none - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show inter-sheet references - - 0 - - - 0 - - 1 - m_showIntersheetsReferences - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - onCheckBoxIref - - - - 15 - wxEXPAND|wxLEFT - 1 - - - bSizerMargins - wxVERTICAL - none - - 5 - wxBOTTOM|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Show own page reference - - 0 - - - 0 - - 1 - m_listOwnPage - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Standard (1,2,3) - - 0 - - - 0 - - 1 - m_radioFormatStandard - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 1 - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Abbreviated (1..3) - - 0 - - - 0 - - 1 - m_radioFormatAbbreviated - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 0 - - - - - - - 5 - wxEXPAND - 1 - - 2 - wxBOTH - 1 - - 0 - - fgSizer4 - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 0 - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Prefix: - 0 - - 0 - - - 0 - - 1 - m_prefixLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - 160,-1 - 1 - m_prefixCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - [ - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Suffix: - 0 - - 0 - - - 0 - - 1 - m_suffixLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - 160,-1 - 1 - m_suffixCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - ] - - - - - - - - - - - - - 5 - wxEXPAND|wxALL - 0 - - wxID_ANY - Dashed Lines - - sbSizer6 - wxVERTICAL - 1 - none - - 5 - wxEXPAND|wxBOTTOM - 0 - - 2 - wxBOTH - - - 0 - - fgSizer41 - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 5 - - 5 - wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Dash length: - 0 - - 0 - - - 0 - - 1 - dashLengthLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_dashLengthCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Gap length: - 0 - - 0 - - - 0 - - 1 - gapLengthLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_gapLengthCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Dash and dot lengths are ratios of the line width. - 0 - - 0 - - - 0 - - 1 - m_dashedLineHelp - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - - - 5 - wxEXPAND|wxALL - 1 - - wxID_ANY - Operating-point Overlay - - sbSizer7 - wxVERTICAL - 1 - none - - 5 - wxEXPAND - 1 - - 2 - wxBOTH - 1 - - 0 - - fgSizer - wxFLEX_GROWMODE_SPECIFIED - none - 4 - 6 - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Significant digits (voltages): - 0 - - 0 - - - 0 - - 1 - vPrecisionLabel - 1 - - - none - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - 3 - 10 - - 0 - - 1 - - 0 - - 1 - m_vPrecisionCtrl - 1 - - - protected - 1 - - Resizable - 1 - - wxSP_ARROW_KEYS - ; ; forward_declare - 0 - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Range (voltages): - 0 - - 0 - - - 0 - - 1 - vRangeLabel - 1 - - - none - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Auto" "fV" "pV" "nV" "uV" "mV" "V" "KV" "MV" "GV" "TV" "PV" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_vRangeCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxLEFT|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Significant digits (currents): - 0 - - 0 - - - 0 - - 1 - iPrecisionLabel - 1 - - - none - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - 3 - 10 - - 0 - - 1 - - 0 - - 1 - m_iPrecisionCtrl - 1 - - - protected - 1 - - Resizable - 1 - - wxSP_ARROW_KEYS - ; ; forward_declare - 0 - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Range (currents): - 0 - - 0 - - - 0 - - 1 - iRangeLabel - 1 - - - none - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxBOTTOM|wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Auto" "fA" "pA" "nA" "uA" "mA" "A" "KA" "MA" "GA" "TA" "PA" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_iRangeCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - + 1 + m_choiceSeparatorRefId + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT + 0 + + wxID_ANY + Text + + sbSizer4 + wxVERTICAL + 1 + none + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 1 + + 3 + wxHORIZONTAL + 1 + + 5 + + fgSizer2 + wxFLEX_GROWMODE_NONE + none + 0 + 5 + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Default text size: + 0 + + 0 + + + 0 + + 1 + m_textSizeLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textSizeCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + mils + 0 + + 0 + + + 0 + + 1 + m_textSizeUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Overbar offset ratio: + 0 + + 0 + + + 0 + + 1 + m_overbarHieghtLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_overbarHeightCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + % + 0 + + 0 + + + 0 + + 1 + m_overbarHeightUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Label offset ratio: + 0 + + 0 + + + 0 + + 1 + m_textOffsetRatioLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Percentage of the text size to offset labels above (or below) a wire, bus, or pin + + + + -1 + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textOffsetRatioCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Percentage of the text size to offset labels above (or below) a wire, bus, or pin + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + % + 0 + + 0 + + + 0 + + 1 + m_offsetRatioUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Global label margin ratio: + 0 + + 0 + + + 0 + + 1 + m_labelSizeRatioLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Percentage of the text size to use as space around a global label + + + + -1 + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_labelSizeRatioCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Percentage of the text size to use as space around a global label + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + % + 0 + + 0 + + + 0 + + 1 + m_labelSizeRatioUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + + + 5 + wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT + 0 + + wxID_ANY + Symbols + + sbSizer41 + wxVERTICAL + 1 + none + + 5 + wxEXPAND|wxBOTTOM + 1 + + 3 + wxBOTH + 1 + + 0 + -1,-1 + fgSizer321 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 5 + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Default line width: + 0 + + 0 + + + 0 + + 1 + m_lineWidthLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_lineWidthCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + mils + 0 + + 0 + + + 0 + + 1 + m_lineWidthUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Pin symbol size: + 0 + + 0 + + + 0 + + 1 + m_pinSymbolSizeLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_pinSymbolSizeCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + mils + 0 + + 0 + + + 0 + + 1 + m_pinSymbolSizeUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + + + 5 + wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT + 1 + + wxID_ANY + Connections + + sbSizer2 + wxVERTICAL + 1 + none + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 1 + + + wxBOTH + 1 + + 5 + + gbSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 5 + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL + 0 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Junction dot size: + 0 + + 0 + + + 0 + + 1 + m_junctionDotLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + 2 + 1 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + "None" "Smallest" "Small" "Default" "Large" "Largest" + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_choiceJunctionDotSize + 1 + + + protected + 1 + + Resizable + 3 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL + 1 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Hop-over size: + 0 + + 0 + + + 0 + + 1 + m_hopOverLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + 2 + 1 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 1 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + "None" "Smallest" "Small" "Medium" "Large" "Largest" + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_choiceHopOverSize + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL + 2 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Connection grid: + 0 + + 0 + + + 0 + + 1 + m_connectionGridLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + 1 + 1 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 2 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_connectionGridCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + 1 + 2 + wxALIGN_CENTER_VERTICAL + 2 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + mils + 0 + + 0 + + + 0 + + 1 + m_connectionGridUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 1 + + + bRightColumn + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Inter-sheet References + + sbSizerIREf + wxVERTICAL + 1 + none + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Show inter-sheet references + + 0 + + + 0 + + 1 + m_showIntersheetsReferences + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + onCheckBoxIref + + + + 15 + wxEXPAND|wxLEFT + 1 + + + bSizerMargins + wxVERTICAL + none + + 5 + wxBOTTOM|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Show own page reference + + 0 + + + 0 + + 1 + m_listOwnPage + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Standard (1,2,3) + + 0 + + + 0 + + 1 + m_radioFormatStandard + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 1 + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Abbreviated (1..3) + + 0 + + + 0 + + 1 + m_radioFormatAbbreviated + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + 5 + wxEXPAND + 1 + + 2 + wxBOTH + 1 + + 0 + + fgSizer4 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 0 + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Prefix: + 0 + + 0 + + + 0 + + 1 + m_prefixLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + 160,-1 + 1 + m_prefixCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + [ + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Suffix: + 0 + + 0 + + + 0 + + 1 + m_suffixLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + 160,-1 + 1 + m_suffixCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + ] + + + + + + + + + + + + + 5 + wxEXPAND|wxALL + 0 + + wxID_ANY + Dashed Lines + + sbSizer6 + wxVERTICAL + 1 + none + + 5 + wxEXPAND|wxBOTTOM + 0 + + 2 + wxBOTH + + + 0 + + fgSizer41 + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 5 + + 5 + wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Dash length: + 0 + + 0 + + + 0 + + 1 + dashLengthLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_dashLengthCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Gap length: + 0 + + 0 + + + 0 + + 1 + gapLengthLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_gapLengthCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Dash and dot lengths are ratios of the line width. + 0 + + 0 + + + 0 + + 1 + m_dashedLineHelp + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + + + 5 + wxEXPAND|wxALL + 1 + + wxID_ANY + Operating-point Overlay + + sbSizer7 + wxVERTICAL + 1 + none + + 5 + wxEXPAND + 1 + + 2 + wxBOTH + 1 + + 0 + + fgSizer + wxFLEX_GROWMODE_SPECIFIED + none + 4 + 6 + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Significant digits (voltages): + 0 + + 0 + + + 0 + + 1 + vPrecisionLabel + 1 + + + none + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + 3 + 10 + + 0 + + 1 + + 0 + + 1 + m_vPrecisionCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxSP_ARROW_KEYS + ; ; forward_declare + 0 + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Range (voltages): + 0 + + 0 + + + 0 + + 1 + vRangeLabel + 1 + + + none + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + "Auto" "fV" "pV" "nV" "uV" "mV" "V" "KV" "MV" "GV" "TV" "PV" + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_vRangeCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Significant digits (currents): + 0 + + 0 + + + 0 + + 1 + iPrecisionLabel + 1 + + + none + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + 3 + 10 + + 0 + + 1 + + 0 + + 1 + m_iPrecisionCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxSP_ARROW_KEYS + ; ; forward_declare + 0 + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Range (currents): + 0 + + 0 + + + 0 + + 1 + iRangeLabel + 1 + + + none + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxBOTTOM|wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + "Auto" "fA" "pA" "nA" "uA" "mA" "A" "KA" "MA" "GA" "TA" "PA" + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_iRangeCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + diff --git a/eeschema/dialogs/panel_setup_formatting_base.h b/eeschema/dialogs/panel_setup_formatting_base.h index d573f1f88e..8dec17f6b4 100644 --- a/eeschema/dialogs/panel_setup_formatting_base.h +++ b/eeschema/dialogs/panel_setup_formatting_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -61,8 +61,10 @@ class PANEL_SETUP_FORMATTING_BASE : public wxPanel wxStaticText* m_pinSymbolSizeLabel; wxTextCtrl* m_pinSymbolSizeCtrl; wxStaticText* m_pinSymbolSizeUnits; - wxStaticText* m_staticText261; + wxStaticText* m_junctionDotLabel; wxChoice* m_choiceJunctionDotSize; + wxStaticText* m_hopOverLabel; + wxChoice* m_choiceHopOverSize; wxStaticText* m_connectionGridLabel; wxTextCtrl* m_connectionGridCtrl; wxStaticText* m_connectionGridUnits; diff --git a/eeschema/dialogs/panel_sym_lib_table.cpp b/eeschema/dialogs/panel_sym_lib_table.cpp index 98cb8d7a4a..5ef523951d 100644 --- a/eeschema/dialogs/panel_sym_lib_table.cpp +++ b/eeschema/dialogs/panel_sym_lib_table.cpp @@ -322,11 +322,11 @@ PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, P const wxString& aGlobalTablePath, SYMBOL_LIB_TABLE* aProjectTable, const wxString& aProjectTablePath ) : - PANEL_SYM_LIB_TABLE_BASE( aParent ), - m_globalTable( aGlobalTable ), - m_projectTable( aProjectTable ), - m_project( aProject ), - m_parent( aParent ) + PANEL_SYM_LIB_TABLE_BASE( aParent ), + m_globalTable( aGlobalTable ), + m_projectTable( aProjectTable ), + m_project( aProject ), + m_parent( aParent ) { // wxGrid only supports user owned tables if they exist past end of ~wxGrid(), // so make it a grid owned table. @@ -451,9 +451,8 @@ bool PANEL_SYM_LIB_TABLE::verifyTables() wxYES_NO | wxCENTER | wxICON_QUESTION | wxYES_DEFAULT ); badCellDlg.SetExtendedMessage( _( "Empty cells will result in all rows that are " "invalid to be removed from the table." ) ); - badCellDlg.SetYesNoLabels( - wxMessageDialog::ButtonLabel( _( "Remove Invalid Cells" ) ), - wxMessageDialog::ButtonLabel( _( "Cancel Table Update" ) ) ); + badCellDlg.SetYesNoLabels( wxMessageDialog::ButtonLabel( _( "Remove Invalid Cells" ) ), + wxMessageDialog::ButtonLabel( _( "Cancel Table Update" ) ) ); wait.reset(); @@ -526,8 +525,8 @@ bool PANEL_SYM_LIB_TABLE::verifyTables() if( nick1 == nick2 ) { - msg = wxString::Format( _( "Multiple libraries cannot share the same " - "nickname ('%s')." ), nick1 ); + msg = wxString::Format( _( "Multiple libraries cannot share the same nickname ('%s')." ), + nick1 ); // show the tabbed panel holding the grid we have flunked: if( model != cur_model() ) @@ -580,8 +579,7 @@ bool PANEL_SYM_LIB_TABLE::verifyTables() wxWindow* topLevelParent = wxGetTopLevelParent( this ); wait.reset(); - wxMessageDialog errdlg( topLevelParent, msg + wxS( "\n" ) + ioe.What(), - _( "Error Loading Library" ) ); + wxMessageDialog errdlg( topLevelParent, msg + wxS( "\n" ) + ioe.What(), _( "Error Loading Library" ) ); errdlg.ShowModal(); return true; @@ -983,11 +981,9 @@ void PANEL_SYM_LIB_TABLE::onConvertLegacyLibraries( wxCommandEvent& event ) std::unique_ptr> props( LIB_TABLE::ParseOptions( options.ToStdString() ) ); - if( SCH_IO_MGR::ConvertLibrary( props.get(), - legacyLib.GetFullPath(), newLib.GetFullPath() ) ) + if( SCH_IO_MGR::ConvertLibrary( props.get(), legacyLib.GetFullPath(), newLib.GetFullPath() ) ) { - relPath = NormalizePath( newLib.GetFullPath(), &Pgm().GetLocalEnvVariables(), - m_project ); + relPath = NormalizePath( newLib.GetFullPath(), &Pgm().GetLocalEnvVariables(), m_project ); // Do not use the project path in the global library table. This will almost // assuredly be wrong for a different project. @@ -1090,10 +1086,6 @@ void PANEL_SYM_LIB_TABLE::populateEnvironReadOnlyTable() m_path_subs_grid->SetCellEditor( row, 1, new GRID_CELL_READONLY_TEXT_EDITOR() ); } - // No combobox editors here, but it looks better if its consistent with the other - // grids in the dialog. - m_path_subs_grid->SetDefaultRowSize( m_path_subs_grid->GetDefaultRowSize() + 2 ); - adjustPathSubsGridColumns( m_path_subs_grid->GetRect().GetWidth() ); } @@ -1164,8 +1156,7 @@ void InvokeSchEditSymbolLibTable( KIWAY* aKiway, wxWindow *aParent ) if( symbolEditor->HasLibModifications() ) { msg = _( "Modifications have been made to one or more symbol libraries.\n" - "Changes must be saved or discarded before the symbol library " - "table can be modified." ); + "Changes must be saved or discarded before the symbol library table can be modified." ); switch( UnsavedChangesDialog( aParent, msg ) ) { @@ -1218,9 +1209,7 @@ void InvokeSchEditSymbolLibTable( KIWAY* aKiway, wxWindow *aParent ) } if( symbolEditor ) - { symbolEditor->ThawLibraryTree(); - } std::string payload = ""; aKiway->ExpressMail( FRAME_SCH, MAIL_RELOAD_LIB, payload ); diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index b1aa50bf19..81ea51ba43 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -60,6 +60,7 @@ bool SCH_EDIT_FRAME::LoadProjectSettings() { SCHEMATIC_SETTINGS& settings = Schematic().Settings(); settings.m_JunctionSize = GetSchematicJunctionSize(); + settings.m_HopOverScale = GetSchematicHopOverScale(); GetRenderSettings()->SetDefaultPenWidth( settings.m_DefaultLineWidth ); GetRenderSettings()->m_LabelSizeRatio = settings.m_LabelSizeRatio; @@ -111,9 +112,7 @@ void SCH_EDIT_FRAME::ShowSchematicSetupDialog( const wxString& aInitialPage ) if( !dialogLock.owns_lock() ) { if( m_schematicSetupDialog && m_schematicSetupDialog->IsShown() ) - { m_schematicSetupDialog->Raise(); // Brings the existing dialog to the front - } return; } @@ -133,7 +132,8 @@ void SCH_EDIT_FRAME::ShowSchematicSetupDialog( const wxString& aInitialPage ) dlg.SetInitialPage( aInitialPage, wxEmptyString ); // Assign dlg to the m_schematicSetupDialog pointer to track its status. - m_schematicSetupDialog = &dlg; + // No, this does not escape the function context. + NULLER raii_nuller( (void*&) m_schematicSetupDialog ); m_schematicSetupDialog = &dlg; // TODO: is QuasiModal required here? if( dlg.ShowQuasiModal() == wxID_OK ) @@ -161,8 +161,7 @@ void SCH_EDIT_FRAME::ShowSchematicSetupDialog( const wxString& aInitialPage ) std::vector> newAliases; - for( SCH_SCREEN* screen = screens.GetFirst(); screen != nullptr; - screen = screens.GetNext() ) + for( SCH_SCREEN* screen = screens.GetFirst(); screen != nullptr; screen = screens.GetNext() ) { for( const std::shared_ptr& alias : screen->GetBusAliases() ) newAliases.push_back( alias ); @@ -174,9 +173,6 @@ void SCH_EDIT_FRAME::ShowSchematicSetupDialog( const wxString& aInitialPage ) RefreshOperatingPointDisplay(); GetCanvas()->Refresh(); } - - // Reset m_schematicSetupDialog after the dialog is closed - m_schematicSetupDialog = nullptr; } @@ -186,12 +182,20 @@ int SCH_EDIT_FRAME::GetSchematicJunctionSize() const std::shared_ptr& netSettings = Prj().GetProjectFile().NetSettings(); int sizeChoice = Schematic().Settings().m_JunctionSizeChoice; - int dotSize = netSettings->GetDefaultNetclass()->GetWireWidth() * sizeMultipliers[sizeChoice]; + int dotSize = KiROUND( netSettings->GetDefaultNetclass()->GetWireWidth() * sizeMultipliers[sizeChoice] ); return std::max( dotSize, 1 ); } +double SCH_EDIT_FRAME::GetSchematicHopOverScale() +{ + std::vector& sizeMultipliers = eeconfig()->m_Drawing.junction_size_mult_list; + + return sizeMultipliers[Schematic().Settings().m_HopOverSizeChoice]; +} + + void SCH_EDIT_FRAME::saveProjectSettings() { wxFileName fn = Schematic().RootScreen()->GetFileName(); //ConfigFileName @@ -209,8 +213,7 @@ void SCH_EDIT_FRAME::saveProjectSettings() // Save the page layout file if doesn't exist yet (e.g. if we opened a non-kicad schematic) // TODO: We need to remove dependence on BASE_SCREEN - Prj().GetProjectFile().m_SchematicSettings->m_SchDrawingSheetFileName - = BASE_SCREEN::m_DrawingSheetFileName; + Prj().GetProjectFile().m_SchematicSettings->m_SchDrawingSheetFileName = BASE_SCREEN::m_DrawingSheetFileName; if( !BASE_SCREEN::m_DrawingSheetFileName.IsEmpty() ) { @@ -303,8 +306,7 @@ void SCH_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg ) cfg->m_FindReplaceExtra.search_all_fields = searchData->searchAllFields; cfg->m_FindReplaceExtra.search_metadata = searchData->searchMetadata; cfg->m_FindReplaceExtra.search_all_pins = searchData->searchAllPins; - cfg->m_FindReplaceExtra.search_current_sheet_only = - searchData->searchCurrentSheetOnly; + cfg->m_FindReplaceExtra.search_current_sheet_only = searchData->searchCurrentSheetOnly; cfg->m_FindReplaceExtra.search_selected_only = searchData->searchSelectedOnly; } @@ -338,7 +340,9 @@ void SCH_EDIT_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg ) cfg->m_AuiPanels.design_blocks_show = designBlocksPane.IsShown(); if( designBlocksPane.IsDocked() ) + { cfg->m_AuiPanels.design_blocks_panel_docked_width = m_designBlocksPane->GetSize().x; + } else { cfg->m_AuiPanels.design_blocks_panel_float_height = designBlocksPane.floating_size.y; @@ -362,7 +366,8 @@ void SCH_BASE_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg ) // Move legacy user grids to grid list if( !aCfg->m_Window.grid.user_grid_x.empty() ) { - aCfg->m_Window.grid.grids.emplace_back( GRID{ "User Grid", aCfg->m_Window.grid.user_grid_x, + aCfg->m_Window.grid.grids.emplace_back( GRID{ "User Grid", + aCfg->m_Window.grid.user_grid_x, aCfg->m_Window.grid.user_grid_y } ); aCfg->m_Window.grid.user_grid_x = wxEmptyString; aCfg->m_Window.grid.user_grid_y = wxEmptyString; @@ -378,9 +383,7 @@ void SCH_BASE_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg ) aCfg->m_Window.grid.fast_grid_2 = 2; if( aCfg->m_Window.zoom_factors.empty() ) - { aCfg->m_Window.zoom_factors = { ZOOM_LIST_EESCHEMA }; - } } diff --git a/eeschema/eeschema_settings.cpp b/eeschema/eeschema_settings.cpp index ef1b4853b0..d00e6af164 100644 --- a/eeschema/eeschema_settings.cpp +++ b/eeschema/eeschema_settings.cpp @@ -244,9 +244,6 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() : m_params.emplace_back( new PARAM( "appearance.show_page_limits", &m_Appearance.show_page_limits, true ) ); - m_params.emplace_back( new PARAM( "appearance.show_hop_over", - &m_Appearance.show_hop_over, false ) ); - m_params.emplace_back( new PARAM( "appearance.show_sexpr_file_convert_warning", &m_Appearance.show_sexpr_file_convert_warning, true ) ); @@ -385,9 +382,12 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() : m_params.emplace_back( new PARAM_LIST( "drawing.junction_size_mult_list", &m_Drawing.junction_size_mult_list, { 0.0, 1.7, 4.0, 6.0, 9.0, 12.0 } ) ); - m_params.emplace_back(new PARAM ( "drawing.junction_size_choice", + m_params.emplace_back( new PARAM( "drawing.junction_size_choice", &m_Drawing.junction_size_choice, 3 ) ); + m_params.emplace_back( new PARAM( "drawing.hop_over_size_choice", + &m_Drawing.hop_over_size_choice, 0 ) ); + m_params.emplace_back( new PARAM( "find_replace.search_all_fields", &m_FindReplaceExtra.search_all_fields, false ) ); diff --git a/eeschema/eeschema_settings.h b/eeschema/eeschema_settings.h index 715f7b2cbd..fe6cc30644 100644 --- a/eeschema/eeschema_settings.h +++ b/eeschema/eeschema_settings.h @@ -87,7 +87,6 @@ public: bool show_pin_alt_icons; bool show_illegal_symbol_lib_dialog; bool show_page_limits; - bool show_hop_over; bool show_sexpr_file_convert_warning; bool show_sheet_filename_case_sensitivity_dialog; }; @@ -179,8 +178,9 @@ public: bool auto_start_wires; std::vector junction_size_mult_list; - // Pulldown index for user default junction dot size (e.g. smallest = 0, small = 1, etc) - int junction_size_choice; + // Pulldown index for user default junction dot size (e.g. none = 0, smallest = 1, small = 2, etc) + int junction_size_choice; + int hop_over_size_choice; }; struct INPUT diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index 2781f59edc..08f4b9c38f 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -1903,6 +1903,7 @@ void SCH_EDIT_FRAME::CommonSettingsChanged( int aFlags ) SCHEMATIC_SETTINGS& settings = Schematic().Settings(); settings.m_JunctionSize = GetSchematicJunctionSize(); + settings.m_HopOverScale = GetSchematicHopOverScale(); ShowAllIntersheetRefs( settings.m_IntersheetRefsShow ); @@ -1929,8 +1930,18 @@ void SCH_EDIT_FRAME::CommonSettingsChanged( int aFlags ) SCH_SCREEN* screen = GetCurrentSheet().LastScreen(); for( SCH_ITEM* item : screen->Items() ) + { item->ClearCaches(); + if( item->Type() == SCH_LINE_T ) + { + SCH_LINE* line = static_cast( item ); + + if( line->IsWire() ) + UpdateHopOveredWires( line ); + } + } + for( const auto& [ libItemName, libSymbol ] : screen->GetLibSymbols() ) libSymbol->ClearCaches(); diff --git a/eeschema/sch_edit_frame.h b/eeschema/sch_edit_frame.h index 5b888f6297..e70772a7b6 100644 --- a/eeschema/sch_edit_frame.h +++ b/eeschema/sch_edit_frame.h @@ -767,6 +767,7 @@ public: const BOX2I GetDocumentExtents( bool aIncludeAllVisible = true ) const override; int GetSchematicJunctionSize(); + double GetSchematicHopOverScale(); void FocusOnItem( EDA_ITEM* aItem ) override; diff --git a/eeschema/sch_line.cpp b/eeschema/sch_line.cpp index 1fea7b9cb2..bac4a89036 100644 --- a/eeschema/sch_line.cpp +++ b/eeschema/sch_line.cpp @@ -1096,10 +1096,11 @@ std::vector SCH_LINE::BuildWireWithHopShape( const SCH_SCREEN* aScreen } else { - auto getDistance = []( const VECTOR2I& a, const VECTOR2I& b ) -> double - { - return std::sqrt( std::pow( a.x - b.x, 2 ) + std::pow( a.y - b.y, 2 ) ); - }; + auto getDistance = + []( const VECTOR2I& a, const VECTOR2I& b ) -> double + { + return std::sqrt( std::pow( a.x - b.x, 2 ) + std::pow( a.y - b.y, 2 ) ); + }; std::sort( intersections.begin(), intersections.end(), [&]( const VECTOR2I& a, const VECTOR2I& b ) @@ -1137,14 +1138,14 @@ std::vector SCH_LINE::BuildWireWithHopShape( const SCH_SCREEN* aScreen VECTOR2I arcMidPoint = { hopMid.x + static_cast( arcRadius * cos( ( startAngleRad + endAngleRad ) / 2.0f ) ), - hopMid.y + static_cast( arcRadius + hopMid.y - static_cast( arcRadius * sin( ( startAngleRad + endAngleRad ) / 2.0f ) ) }; VECTOR2I beforeHop = hopMid - VECTOR2I( arcRadius * std::cos( lineAngle ), - arcRadius * std::sin( lineAngle ) ); + arcRadius * std::sin( lineAngle ) ); VECTOR2I afterHop = hopMid + VECTOR2I( arcRadius * std::cos( lineAngle ), - arcRadius * std::sin( lineAngle ) ); + arcRadius * std::sin( lineAngle ) ); // Draw the line from the current start point to the before-hop point wire_shape.emplace_back( currentStart.x, currentStart.y, 0 ); diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 88bb91b562..876fbc052b 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -1364,11 +1364,13 @@ void SCH_PAINTER::draw( const SCH_LINE* aLine, int aLayer ) bool highlightNetclassColors = false; double highlightAlpha = 0.6; EESCHEMA_SETTINGS* eeschemaCfg = eeconfig(); - bool showHopOver = false; + double hopOverScale = 0.0; + + if( aLine->Schematic() ) // Can be nullptr when run from the color selection panel + hopOverScale = aLine->Schematic()->Settings().m_HopOverScale; if( eeschemaCfg ) { - showHopOver = eeschemaCfg->m_Appearance.show_hop_over; highlightNetclassColors = eeschemaCfg->m_Selection.highlight_netclass_colors; highlightAlpha = eeschemaCfg->m_Selection.highlight_netclass_colors_alpha; } @@ -1485,10 +1487,10 @@ void SCH_PAINTER::draw( const SCH_LINE* aLine, int aLayer ) std::vector curr_wire_shape; - if( aLine->IsWire() && showHopOver ) + if( aLine->IsWire() && hopOverScale > 0.0 ) { double lineWidth = getLineWidth( aLine, false, drawingNetColorHighlights ); - double arcRadius = lineWidth * ADVANCED_CFG::GetCfg().m_hopOverArcRadius; + double arcRadius = lineWidth * hopOverScale; curr_wire_shape = aLine->BuildWireWithHopShape( m_schematic->GetCurrentScreen(), arcRadius ); } else diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index ef5567ff49..46a31b3dfe 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -925,10 +925,12 @@ void SCH_SCREEN::Plot( PLOTTER* aPlotter, const SCH_PLOT_OPTS& aPlotOpts ) const SCH_LINE* aLine = static_cast( item ); if( !aLine->IsWire() || !aPlotOpts.m_plotHopOver ) + { item->Plot( aPlotter, !background, aPlotOpts, 0, 0, { 0, 0 }, false ); + } else { - double arcRadius = lineWidth * ADVANCED_CFG::GetCfg().m_hopOverArcRadius; + double arcRadius = lineWidth * aLine->Schematic()->Settings().m_HopOverScale; std::vector curr_wire_shape = aLine->BuildWireWithHopShape( this, arcRadius ); for( size_t ii = 1; ii < curr_wire_shape.size(); ii++ ) diff --git a/eeschema/schematic_settings.cpp b/eeschema/schematic_settings.cpp index 1d935566f2..941792c5a7 100644 --- a/eeschema/schematic_settings.cpp +++ b/eeschema/schematic_settings.cpp @@ -45,6 +45,8 @@ SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::strin m_PinSymbolSize( DEFAULT_TEXT_SIZE * schIUScale.IU_PER_MILS / 2 ), m_JunctionSizeChoice( 3 ), m_JunctionSize( DEFAULT_JUNCTION_DIAM * schIUScale.IU_PER_MILS ), + m_HopOverSizeChoice( 0 ), + m_HopOverScale( 0.0 ), m_ConnectionGridSize( DEFAULT_CONNECTION_GRID_MILS * schIUScale.IU_PER_MILS ), m_AnnotateStartNum( 0 ), m_IntersheetRefsShow( false ), @@ -73,6 +75,7 @@ SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::strin int defaultTextSize = cfg ? cfg->m_Drawing.default_text_size : DEFAULT_TEXT_SIZE; int defaultPinSymbolSize = cfg ? cfg->m_Drawing.pin_symbol_size : DEFAULT_TEXT_SIZE / 2; int defaultJunctionSizeChoice = cfg ? cfg->m_Drawing.junction_size_choice : 3; + int defaultHopOverSizeChoice = cfg ? cfg->m_Drawing.hop_over_size_choice : 0; bool defaultIntersheetsRefShow = cfg ? cfg->m_Drawing.intersheets_ref_show : false; bool defaultIntersheetsRefOwnPage = cfg ? cfg->m_Drawing.intersheets_ref_own_page : true; bool defaultIntersheetsRefFormatShort = cfg ? cfg->m_Drawing.intersheets_ref_short : false; @@ -146,6 +149,9 @@ SCHEMATIC_SETTINGS::SCHEMATIC_SETTINGS( JSON_SETTINGS* aParent, const std::strin m_params.emplace_back( new PARAM( "drawing.junction_size_choice", &m_JunctionSizeChoice, defaultJunctionSizeChoice ) ); + m_params.emplace_back( new PARAM( "drawing.hop_over_size_choice", + &m_HopOverSizeChoice, defaultHopOverSizeChoice ) ); + m_params.emplace_back( new PARAM_LAMBDA( "drawing.field_names", [&]() -> nlohmann::json { diff --git a/eeschema/schematic_settings.h b/eeschema/schematic_settings.h index 3403ff408f..bab0765021 100644 --- a/eeschema/schematic_settings.h +++ b/eeschema/schematic_settings.h @@ -62,6 +62,9 @@ public: int m_JunctionSizeChoice; // none = 0, smallest = 1, small = 2, etc. int m_JunctionSize; // a runtime cache of the calculated size + int m_HopOverSizeChoice; // none = 0, smallest = 1, etc. + double m_HopOverScale; // a runtime cache of the calculated lineWidth multiplier + int m_ConnectionGridSize; // usually 50mils (IU internally; mils in the JSON file) int m_AnnotateStartNum; // Starting value for annotation diff --git a/eeschema/schematic_undo_redo.cpp b/eeschema/schematic_undo_redo.cpp index edcf670ea8..776e2d0e7d 100644 --- a/eeschema/schematic_undo_redo.cpp +++ b/eeschema/schematic_undo_redo.cpp @@ -559,7 +559,7 @@ void SCH_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList ) SetSheetNumberAndCount(); // Restore hop over shapes of wires, if any - if( eeconfig()->m_Appearance.show_hop_over ) + if( m_schematic->Settings().m_HopOverScale > 0.0 ) { for( SCH_ITEM* item : GetScreen()->Items() ) { diff --git a/include/advanced_config.h b/include/advanced_config.h index 0fa6e8631e..e8aae7e75c 100644 --- a/include/advanced_config.h +++ b/include/advanced_config.h @@ -713,15 +713,6 @@ public: */ double m_MinimumMarkerSeparationDistance; - /** - * Default value for the Hop-Over Arc Radius, used to calculate the arc radius by multiplying - * the line width when drawing a hop-over in scenarios where a wire crosses another. - * - * Setting name: "HopOverArcRadius" - * Default value: 2.5 - */ - double m_hopOverArcRadius; - /** * When updating the net inspector, it either recalculates all nets or iterates through items * one-by-one. This value controls the threshold at which all nets are recalculated rather than diff --git a/include/kidialog.h b/include/kidialog.h index 2987ae0076..e22a531fd4 100644 --- a/include/kidialog.h +++ b/include/kidialog.h @@ -36,10 +36,17 @@ #include +#if defined( _WIN32 ) && wxCHECK_VERSION( 3, 3, 0 ) +#define KIDIALOG_BASE wxGenericRichMessageDialog +#else +#define KIDIALOG_BASE wxRichMessageDialog +#endif + + /** * Helper class to create more flexible dialogs, including 'do not show again' checkbox handling. */ -class KICOMMON_API KIDIALOG : public wxRichMessageDialog +class KICOMMON_API KIDIALOG : public KIDIALOG_BASE { public: ///< Dialog type. Selects appropriate icon and default dialog title @@ -53,7 +60,7 @@ public: bool SetOKCancelLabels( const ButtonLabel& ok, const ButtonLabel& cancel ) override { m_cancelMeansCancel = false; - return wxRichMessageDialog::SetOKCancelLabels( ok, cancel ); + return KIDIALOG_BASE::SetOKCancelLabels( ok, cancel ); } /// Shows the 'do not show again' checkbox. diff --git a/kicad/dialogs/dialog_executecommand_job_settings.cpp b/kicad/dialogs/dialog_executecommand_job_settings.cpp index d225e8eef3..0e98c72a54 100644 --- a/kicad/dialogs/dialog_executecommand_job_settings.cpp +++ b/kicad/dialogs/dialog_executecommand_job_settings.cpp @@ -160,10 +160,6 @@ void DIALOG_EXECUTECOMMAND_JOB_SETTINGS::populateEnvironReadOnlyTable() m_path_subs_grid->SetCellEditor( row, 1, new GRID_CELL_READONLY_TEXT_EDITOR() ); } - // No combobox editors here, but it looks better if its consistent with the other - // grids in the dialog. - m_path_subs_grid->SetDefaultRowSize( m_path_subs_grid->GetDefaultRowSize() + 2 ); - adjustPathSubsGridColumns( m_path_subs_grid->GetRect().GetWidth() ); } diff --git a/kicad/dialogs/panel_jobset.cpp b/kicad/dialogs/panel_jobset.cpp index 9fbf2492d4..c4df600e8d 100644 --- a/kicad/dialogs/panel_jobset.cpp +++ b/kicad/dialogs/panel_jobset.cpp @@ -149,10 +149,7 @@ public: if( m_destination->m_lastRunReporters.contains( jobId ) ) { - WX_STRING_REPORTER* reporter = - static_cast( m_destination->m_lastRunReporters[jobId] ); - - if( reporter ) + if( auto* reporter = static_cast( m_destination->m_lastRunReporters[jobId] ) ) m_textCtrlOutput->SetValue( reporter->GetMessages() ); } else @@ -253,9 +250,8 @@ public: { wxClientDC dc( this ); int width = GetSize().GetWidth(); - wxString msg = aMsg; - m_pathInfo->SetLabel( wxControl::Ellipsize( msg, dc, wxELLIPSIZE_MIDDLE, width ) ); + m_pathInfo->SetLabel( wxControl::Ellipsize( aMsg, dc, wxELLIPSIZE_MIDDLE, width ) ); } virtual void OnGenerate( wxCommandEvent& event ) override @@ -274,15 +270,14 @@ public: JOBS_RUNNER jobRunner( &( m_frame->Kiway() ), m_jobsFile, &project ); - auto* progressReporter = new WX_PROGRESS_REPORTER( m_frame, _( "Run Jobs" ), 1, - PR_NO_ABORT ); + { + WX_PROGRESS_REPORTER progressReporter( m_frame, _( "Run Jobs" ), 1, PR_NO_ABORT ); - if( JOBSET_DESTINATION* destination = GetDestination() ) - jobRunner.RunJobsForDestination( destination ); + if( JOBSET_DESTINATION* destination = GetDestination() ) + jobRunner.RunJobsForDestination( destination ); - UpdateStatus(); - - delete progressReporter; + UpdateStatus(); + } // Bring the Kicad manager frame back to the front m_frame->Raise(); @@ -486,7 +481,6 @@ PANEL_JOBSET::PANEL_JOBSET( wxAuiNotebook* aParent, KICAD_MANAGER_FRAME* aFrame, { m_jobsGrid->PushEventHandler( new JOBS_GRID_TRICKS( this, m_jobsGrid ) ); - m_jobsGrid->SetDefaultRowSize( m_jobsGrid->GetDefaultRowSize() + 4 ); m_jobsGrid->OverrideMinSize( 0.6, 0.3 ); m_jobsGrid->SetSelectionMode( wxGrid::wxGridSelectRows ); @@ -577,10 +571,9 @@ void PANEL_JOBSET::UpdateTitle() tabName = wxS( "*" ) + tabName; int pageIdx = m_parentBook->FindPage( this ); + if( pageIdx >= 0 ) - { m_parentBook->SetPageText( pageIdx, tabName ); - } } @@ -778,7 +771,10 @@ void PANEL_JOBSET::OnJobButtonDelete( wxCommandEvent& aEvent ) m_jobsGrid->ClearSelection(); // Reverse sort so deleting a row doesn't change the indexes of the other rows. - selectedRows.Sort( []( int* first, int* second ) { return *second - *first; } ); + selectedRows.Sort( []( int* first, int* second ) + { + return *second - *first; + } ); int select = selectedRows[0]; @@ -852,7 +848,7 @@ bool PANEL_JOBSET::GetCanClose() if( !HandleUnsavedChanges( this, wxString::Format( msg, fileName.GetFullName() ), [&]() -> bool { - return m_jobsFile->SaveToFile(wxEmptyString, true); + return m_jobsFile->SaveToFile( wxEmptyString, true ); } ) ) { return false; @@ -987,7 +983,7 @@ void PANEL_JOBSET::OnGenerateAllDestinationsClick( wxCommandEvent& event ) CallAfter( [this]() { - PROJECT& project = m_frame->Kiway().Prj(); + PROJECT& project = m_frame->Kiway().Prj(); EnsurePcbSchFramesOpen(); wxFileName fn = project.GetProjectFullName(); @@ -995,15 +991,14 @@ void PANEL_JOBSET::OnGenerateAllDestinationsClick( wxCommandEvent& event ) JOBS_RUNNER jobRunner( &( m_frame->Kiway() ), m_jobsFile.get(), &project ); - auto* progressReporter = new WX_PROGRESS_REPORTER( m_frame, _( "Run Jobs" ), 1, - PR_NO_ABORT ); + { + WX_PROGRESS_REPORTER progressReporter( m_frame, _( "Run Jobs" ), 1, PR_NO_ABORT ); - jobRunner.RunJobsAllDestinations(); + jobRunner.RunJobsAllDestinations(); - for( PANEL_DESTINATION* panel : GetDestinationPanels() ) - panel->UpdateStatus(); - - delete progressReporter; + for( PANEL_DESTINATION* panel : GetDestinationPanels() ) + panel->UpdateStatus(); + } // Bring the Kicad manager frame back to the front m_frame->Raise(); @@ -1013,9 +1008,8 @@ void PANEL_JOBSET::OnGenerateAllDestinationsClick( wxCommandEvent& event ) void PANEL_JOBSET::OnSizeGrid( wxSizeEvent& aEvent ) { - m_jobsGrid->SetColSize( COL_DESCR, m_jobsGrid->GetSize().x - - m_jobsGrid->GetColSize( COL_SOURCE ) - - m_jobsGrid->GetColSize( COL_NUMBER ) ); + m_jobsGrid->SetColSize( COL_DESCR, m_jobsGrid->GetSize().x - m_jobsGrid->GetColSize( COL_SOURCE ) + - m_jobsGrid->GetColSize( COL_NUMBER ) ); // Always propagate for a grid repaint (needed if the height changes, as well as width) aEvent.Skip(); diff --git a/pcbnew/dialogs/dialog_board_statistics.cpp b/pcbnew/dialogs/dialog_board_statistics.cpp index 68b9adee22..a9cee95145 100644 --- a/pcbnew/dialogs/dialog_board_statistics.cpp +++ b/pcbnew/dialogs/dialog_board_statistics.cpp @@ -174,17 +174,17 @@ void DIALOG_BOARD_STATISTICS::refreshItemsTypes() m_viaTypes.push_back( LINE_ITEM( VIATYPE::MICROVIA, _( "Micro vias:" ) ) ); // If there not enough rows in grids, append some - int appendRows = m_fpTypes.size() + 2 - m_gridComponents->GetNumberRows(); + int appendRows = (int) m_fpTypes.size() + 2 - m_gridComponents->GetNumberRows(); if( appendRows > 0 ) m_gridComponents->AppendRows( appendRows ); - appendRows = m_padTypes.size() + 1 - m_gridPads->GetNumberRows(); + appendRows = (int) m_padTypes.size() + 1 - m_gridPads->GetNumberRows(); if( appendRows > 0 ) m_gridPads->AppendRows( appendRows ); - appendRows = m_viaTypes.size() + 1 - m_gridVias->GetNumberRows(); + appendRows = (int) m_viaTypes.size() + 1 - m_gridVias->GetNumberRows(); if( appendRows ) m_gridVias->AppendRows( appendRows ); @@ -403,13 +403,21 @@ void DIALOG_BOARD_STATISTICS::getDataFromPCB() // to be taken in account to calculate the physical board bbox BOX2I bbox = polySet.BBox(); - m_boardWidth = bbox.GetWidth(); - m_boardHeight = bbox.GetHeight(); + m_boardWidth = (int) bbox.GetWidth(); + m_boardHeight = (int) bbox.GetHeight(); } board->RunOnChildren( [&]( BOARD_ITEM* child ) { + if( child->Type() == PCB_FOOTPRINT_T + || child->Type() == PCB_GROUP_T + || child->Type() == PCB_GENERATOR_T ) + { + // Wait for recursion into children + return; + } + if( child->IsOnLayer( F_Cu ) ) child->TransformShapeToPolySet( frontCopper, F_Cu, 0, ARC_LOW_DEF, ERROR_INSIDE ); @@ -438,7 +446,8 @@ void DIALOG_BOARD_STATISTICS::getDataFromPCB() if( via->IsOnLayer( B_Cu ) ) TransformCircleToPolygon( backHoles, center, R, ARC_LOW_DEF, ERROR_OUTSIDE ); } - }, RECURSE_MODE::RECURSE ); + }, + RECURSE_MODE::RECURSE ); if( m_checkBoxSubtractHolesFromCopper->GetValue() ) { @@ -595,15 +604,15 @@ void DIALOG_BOARD_STATISTICS::printGridToStringAsTable( wxGrid* aGrid, wxString& if( aUseColLabels ) { for( int col = 0; col < aGrid->GetNumberCols(); col++ ) - widths[col] = aGrid->GetColLabelValue( col ).length(); + widths[col] = (int) aGrid->GetColLabelValue( col ).length(); } for( int row = 0; row < aGrid->GetNumberRows(); row++ ) { - rowLabelsWidth = std::max( rowLabelsWidth, aGrid->GetRowLabelValue( row ).length() ); + rowLabelsWidth = std::max( rowLabelsWidth, (int) aGrid->GetRowLabelValue( row ).length() ); for( int col = 0; col < aGrid->GetNumberCols(); col++ ) - widths[col] = std::max( widths[col], aGrid->GetCellValue( row, col ).length() ); + widths[col] = std::max( widths[col], (int) aGrid->GetCellValue( row, col ).length() ); } // Print the cells. @@ -783,7 +792,7 @@ void DIALOG_BOARD_STATISTICS::saveReportClicked( wxCommandEvent& aEvent ) widths.reserve( labels.size() ); for( const wxString& label : labels ) - widths.push_back( label.size() ); + widths.push_back( (int) label.size() ); int frontTotal = 0; int backTotal = 0; @@ -791,18 +800,18 @@ void DIALOG_BOARD_STATISTICS::saveReportClicked( wxCommandEvent& aEvent ) for( const FP_LINE_ITEM& line : m_fpTypes ) { // Get maximum width for left label column - widths[0] = std::max( line.title.size(), widths[0] ); + widths[0] = std::max( (int) line.title.size(), widths[0] ); frontTotal += line.frontSideQty; backTotal += line.backSideQty; } // Get maximum width for other columns tmp.Printf( wxT( "%i" ), frontTotal ); - widths[1] = std::max( tmp.size(), widths[1] ); + widths[1] = std::max( (int) tmp.size(), widths[1] ); tmp.Printf( wxT( "%i" ), backTotal ); - widths[2] = std::max( tmp.size(), widths[2] ); + widths[2] = std::max( (int) tmp.size(), widths[2] ); tmp.Printf( wxT( "%i" ), frontTotal + backTotal ); - widths[3] = std::max( tmp.size(), widths[3] ); + widths[3] = std::max( (int) tmp.size(), widths[3] ); //Write components amount to file msg << wxT( "\n" ); diff --git a/pcbnew/dialogs/dialog_exchange_footprints.cpp b/pcbnew/dialogs/dialog_exchange_footprints.cpp index eedefc5534..e900c4663a 100644 --- a/pcbnew/dialogs/dialog_exchange_footprints.cpp +++ b/pcbnew/dialogs/dialog_exchange_footprints.cpp @@ -40,6 +40,8 @@ #include #include +#include + #define ID_MATCH_FP_ALL 4200 #define ID_MATCH_FP_SELECTED 4201 @@ -246,62 +248,74 @@ void DIALOG_EXCHANGE_FOOTPRINTS::updateMatchModeRadioButtons( wxUpdateUIEvent& ) } -void DIALOG_EXCHANGE_FOOTPRINTS::OnMatchAllClicked( wxCommandEvent& event ) +void DIALOG_EXCHANGE_FOOTPRINTS::OnMatchAllClicked( wxCommandEvent& aEvent ) { *m_matchMode = ID_MATCH_FP_ALL; - if( event.GetEventObject() == this ) + if( aEvent.GetEventObject() == this ) SetInitialFocus( m_matchAll ); else m_matchAll->SetFocus(); } -void DIALOG_EXCHANGE_FOOTPRINTS::OnMatchSelectedClicked( wxCommandEvent& event ) +void DIALOG_EXCHANGE_FOOTPRINTS::OnMatchSelectedClicked( wxCommandEvent& aEvent ) { *m_matchMode = ID_MATCH_FP_SELECTED; - if( event.GetEventObject() == this ) + if( aEvent.GetEventObject() == this ) SetInitialFocus( m_matchSelected ); else m_matchSelected->SetFocus(); } -void DIALOG_EXCHANGE_FOOTPRINTS::OnMatchRefClicked( wxCommandEvent& event ) +void DIALOG_EXCHANGE_FOOTPRINTS::OnMatchRefClicked( wxCommandEvent& aEvent ) { *m_matchMode = ID_MATCH_FP_REF; - if( event.GetEventObject() == this ) + if( aEvent.GetEventObject() == this ) SetInitialFocus( m_specifiedRef ); - else if( event.GetEventObject() != m_specifiedRef ) + else if( aEvent.GetEventObject() != m_specifiedRef ) m_specifiedRef->SetFocus(); } -void DIALOG_EXCHANGE_FOOTPRINTS::OnMatchValueClicked( wxCommandEvent& event ) +void DIALOG_EXCHANGE_FOOTPRINTS::OnMatchValueClicked( wxCommandEvent& aEvent ) { *m_matchMode = ID_MATCH_FP_VAL; - if( event.GetEventObject() == this ) + if( aEvent.GetEventObject() == this ) SetInitialFocus( m_specifiedValue ); - else if( event.GetEventObject() != m_specifiedValue ) + else if( aEvent.GetEventObject() != m_specifiedValue ) m_specifiedValue->SetFocus(); } -void DIALOG_EXCHANGE_FOOTPRINTS::OnMatchIDClicked( wxCommandEvent& event ) +void DIALOG_EXCHANGE_FOOTPRINTS::OnMatchIDClicked( wxCommandEvent& aEvent ) { *m_matchMode = ID_MATCH_FP_ID; - if( event.GetEventObject() == this ) + if( aEvent.GetEventObject() == this ) SetInitialFocus( m_specifiedID ); - else if( event.GetEventObject() != m_specifiedID ) + else if( aEvent.GetEventObject() != m_specifiedID ) m_specifiedID->SetFocus(); } -void DIALOG_EXCHANGE_FOOTPRINTS::OnOKClicked( wxCommandEvent& event ) +void DIALOG_EXCHANGE_FOOTPRINTS::checkAll( bool aCheck ) +{ + m_removeExtraBox->SetValue( aCheck ); + m_resetTextItemLayers->SetValue( aCheck ); + m_resetTextItemEffects->SetValue( aCheck ); + m_resetTextItemContent->SetValue( aCheck ); + m_resetFabricationAttrs->SetValue( aCheck ); + m_resetClearanceOverrides->SetValue( aCheck ); + m_reset3DModels->SetValue( aCheck ); +} + + +void DIALOG_EXCHANGE_FOOTPRINTS::OnOKClicked( wxCommandEvent& aEvent ) { PCB_SELECTION_TOOL* selTool = m_parent->GetToolManager()->GetTool(); wxBusyCursor dummy; @@ -340,11 +354,8 @@ void DIALOG_EXCHANGE_FOOTPRINTS::processMatchingFootprints() * NB: the change is done from the last footprint because processFootprint() modifies the * last item in the list. */ - for( auto it = m_parent->GetBoard()->Footprints().rbegin(); - it != m_parent->GetBoard()->Footprints().rend(); it++ ) + for( FOOTPRINT* footprint : std::ranges::reverse_view( m_parent->GetBoard()->Footprints() ) ) { - FOOTPRINT* footprint = *it; - if( !isMatch( footprint ) ) continue; diff --git a/pcbnew/dialogs/dialog_exchange_footprints.h b/pcbnew/dialogs/dialog_exchange_footprints.h index 044baa2629..0c392e7fb7 100644 --- a/pcbnew/dialogs/dialog_exchange_footprints.h +++ b/pcbnew/dialogs/dialog_exchange_footprints.h @@ -41,14 +41,26 @@ public: ~DIALOG_EXCHANGE_FOOTPRINTS() override; private: - void updateMatchModeRadioButtons( wxUpdateUIEvent& event ) override; - void OnMatchAllClicked( wxCommandEvent& event ) override; - void OnMatchSelectedClicked( wxCommandEvent& event ) override; - void OnMatchRefClicked( wxCommandEvent& event ) override; - void OnMatchValueClicked( wxCommandEvent& event ) override; - void OnMatchIDClicked( wxCommandEvent& event ) override; - void OnOKClicked( wxCommandEvent& event ) override; - void ViewAndSelectFootprint( wxCommandEvent& event ) override; + void updateMatchModeRadioButtons( wxUpdateUIEvent& aEvent ) override; + void OnMatchAllClicked( wxCommandEvent& aEvent ) override; + void OnMatchSelectedClicked( wxCommandEvent& aEvent ) override; + void OnMatchRefClicked( wxCommandEvent& aEvent ) override; + void OnMatchValueClicked( wxCommandEvent& aEvent ) override; + void OnMatchIDClicked( wxCommandEvent& aEvent ) override; + void OnOKClicked( wxCommandEvent& aEvent ) override; + void ViewAndSelectFootprint( wxCommandEvent& aEvent ) override; + + void onCheckAll( wxCommandEvent& aEvent ) override + { + checkAll( true ); + } + + void onUncheckAll( wxCommandEvent& aEvent ) override + { + checkAll( false ); + } + + void checkAll( bool aCheck ); wxRadioButton* getRadioButtonForMode(); diff --git a/pcbnew/dialogs/dialog_exchange_footprints_base.cpp b/pcbnew/dialogs/dialog_exchange_footprints_base.cpp index 1495c8b0b7..1bdafd6263 100644 --- a/pcbnew/dialogs/dialog_exchange_footprints_base.cpp +++ b/pcbnew/dialogs/dialog_exchange_footprints_base.cpp @@ -23,27 +23,39 @@ DIALOG_EXCHANGE_FOOTPRINTS_BASE::DIALOG_EXCHANGE_FOOTPRINTS_BASE( wxWindow* pare m_upperSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); m_matchAll = new wxRadioButton( this, wxID_ANY, _("Update all footprints on board"), wxDefaultPosition, wxDefaultSize, 0 ); - m_upperSizer->Add( m_matchAll, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALL, 5 ); + m_upperSizer->Add( m_matchAll, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); m_matchSelected = new wxRadioButton( this, wxID_ANY, _("Update selected footprint(s)"), wxDefaultPosition, wxDefaultSize, 0 ); - m_upperSizer->Add( m_matchSelected, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + m_upperSizer->Add( m_matchSelected, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); m_matchSpecifiedRef = new wxRadioButton( this, wxID_ANY, _("Update footprints matching reference designator:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_upperSizer->Add( m_matchSpecifiedRef, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 ); + m_upperSizer->Add( m_matchSpecifiedRef, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); m_specifiedRef = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); m_specifiedRef->SetMinSize( wxSize( 200,-1 ) ); - m_upperSizer->Add( m_specifiedRef, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxTOP|wxEXPAND, 2 ); + m_upperSizer->Add( m_specifiedRef, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP|wxBOTTOM, 2 ); m_matchSpecifiedValue = new wxRadioButton( this, wxID_ANY, _("Update footprints matching value:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_upperSizer->Add( m_matchSpecifiedValue, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALL, 5 ); + m_upperSizer->Add( m_matchSpecifiedValue, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); m_specifiedValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); - m_upperSizer->Add( m_specifiedValue, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 2 ); + m_upperSizer->Add( m_specifiedValue, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM, 2 ); m_matchSpecifiedID = new wxRadioButton( this, wxID_ANY, _("Update footprints with library id:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_upperSizer->Add( m_matchSpecifiedID, wxGBPosition( 4, 0 ), wxGBSpan( 1, 2 ), wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5 ); + m_upperSizer->Add( m_matchSpecifiedID, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxHORIZONTAL ); + + m_specifiedID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); + bSizer7->Add( m_specifiedID, 1, wxALIGN_CENTER_VERTICAL, 5 ); + + m_specifiedIDBrowseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + bSizer7->Add( m_specifiedIDBrowseButton, 0, wxALIGN_CENTER_VERTICAL, 2 ); + + + m_upperSizer->Add( bSizer7, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); m_upperSizer->AddGrowableCol( 1 ); @@ -53,14 +65,6 @@ DIALOG_EXCHANGE_FOOTPRINTS_BASE::DIALOG_EXCHANGE_FOOTPRINTS_BASE( wxWindow* pare wxBoxSizer* bSizer4; bSizer4 = new wxBoxSizer( wxHORIZONTAL ); - m_specifiedID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); - m_specifiedID->SetMinSize( wxSize( 500,-1 ) ); - - bSizer4->Add( m_specifiedID, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_specifiedIDBrowseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bSizer4->Add( m_specifiedIDBrowseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 2 ); - m_mainSizer->Add( bSizer4, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 ); @@ -68,15 +72,15 @@ DIALOG_EXCHANGE_FOOTPRINTS_BASE::DIALOG_EXCHANGE_FOOTPRINTS_BASE( wxWindow* pare wxStaticLine* staticline1; staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - m_changeSizer->Add( staticline1, 0, wxEXPAND|wxBOTTOM, 5 ); + m_changeSizer->Add( staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 3 ); + + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxHORIZONTAL ); wxStaticText* newIdLabel; newIdLabel = new wxStaticText( this, wxID_ANY, _("New footprint library id:"), wxDefaultPosition, wxDefaultSize, 0 ); newIdLabel->Wrap( -1 ); - m_changeSizer->Add( newIdLabel, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5 ); - - wxBoxSizer* bSizer3; - bSizer3 = new wxBoxSizer( wxHORIZONTAL ); + bSizer3->Add( newIdLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); m_newID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_newID->SetMinSize( wxSize( 500,-1 ) ); @@ -84,38 +88,65 @@ DIALOG_EXCHANGE_FOOTPRINTS_BASE::DIALOG_EXCHANGE_FOOTPRINTS_BASE( wxWindow* pare bSizer3->Add( m_newID, 1, wxALIGN_CENTER_VERTICAL, 5 ); m_newIDBrowseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bSizer3->Add( m_newIDBrowseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 2 ); + bSizer3->Add( m_newIDBrowseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - m_changeSizer->Add( bSizer3, 1, wxEXPAND|wxLEFT, 5 ); + m_changeSizer->Add( bSizer3, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 ); - m_mainSizer->Add( m_changeSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 ); + m_changeSizer->Add( 0, 3, 0, wxEXPAND, 5 ); - m_updateOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Update Options") ), wxVERTICAL ); - m_removeExtraBox = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Remove text items which are not in library footprint"), wxDefaultPosition, wxDefaultSize, 0 ); + m_mainSizer->Add( m_changeSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_updateOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Update Options") ), wxHORIZONTAL ); + + wxBoxSizer* bSizer5; + bSizer5 = new wxBoxSizer( wxVERTICAL ); + + m_removeExtraBox = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Remove text items if not in library footprint"), wxDefaultPosition, wxDefaultSize, 0 ); m_removeExtraBox->SetToolTip( _("Removes fields that do not occur in the original library symbols") ); - m_updateOptionsSizer->Add( m_removeExtraBox, 0, wxBOTTOM|wxRIGHT, 5 ); + bSizer5->Add( m_removeExtraBox, 0, wxBOTTOM|wxRIGHT, 5 ); m_resetTextItemLayers = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset text layers and visibilities"), wxDefaultPosition, wxDefaultSize, 0 ); - m_updateOptionsSizer->Add( m_resetTextItemLayers, 0, wxBOTTOM|wxRIGHT, 5 ); + bSizer5->Add( m_resetTextItemLayers, 0, wxBOTTOM|wxRIGHT, 5 ); m_resetTextItemEffects = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset text sizes, styles and positions"), wxDefaultPosition, wxDefaultSize, 0 ); - m_updateOptionsSizer->Add( m_resetTextItemEffects, 0, wxBOTTOM|wxRIGHT, 5 ); + bSizer5->Add( m_resetTextItemEffects, 0, wxBOTTOM|wxRIGHT, 5 ); m_resetTextItemContent = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset text content"), wxDefaultPosition, wxDefaultSize, 0 ); - m_updateOptionsSizer->Add( m_resetTextItemContent, 0, wxBOTTOM|wxRIGHT, 5 ); + bSizer5->Add( m_resetTextItemContent, 0, wxBOTTOM|wxRIGHT, 5 ); + + + bSizer5->Add( 0, 10, 1, 0, 5 ); + + m_checkAll = new wxButton( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Check All Update Options"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer5->Add( m_checkAll, 0, wxEXPAND, 5 ); + + + m_updateOptionsSizer->Add( bSizer5, 1, wxEXPAND|wxRIGHT, 10 ); + + wxBoxSizer* bSizer6; + bSizer6 = new wxBoxSizer( wxVERTICAL ); m_resetFabricationAttrs = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset fabrication attributes"), wxDefaultPosition, wxDefaultSize, 0 ); - m_updateOptionsSizer->Add( m_resetFabricationAttrs, 0, wxBOTTOM|wxRIGHT, 5 ); + bSizer6->Add( m_resetFabricationAttrs, 0, wxBOTTOM|wxRIGHT, 5 ); m_resetClearanceOverrides = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset clearance overrides"), wxDefaultPosition, wxDefaultSize, 0 ); - m_updateOptionsSizer->Add( m_resetClearanceOverrides, 0, wxBOTTOM|wxRIGHT, 5 ); + bSizer6->Add( m_resetClearanceOverrides, 0, wxBOTTOM|wxRIGHT, 5 ); m_reset3DModels = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Update/reset 3D models"), wxDefaultPosition, wxDefaultSize, 0 ); - m_updateOptionsSizer->Add( m_reset3DModels, 0, wxBOTTOM|wxRIGHT, 5 ); + bSizer6->Add( m_reset3DModels, 0, wxBOTTOM|wxRIGHT, 5 ); + + + bSizer6->Add( 0, 10, 1, 0, 5 ); + + m_uncheckAll = new wxButton( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Uncheck All Update Options"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer6->Add( m_uncheckAll, 0, wxEXPAND, 5 ); + + + m_updateOptionsSizer->Add( bSizer6, 1, wxEXPAND, 5 ); m_mainSizer->Add( m_updateOptionsSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 ); @@ -154,6 +185,8 @@ DIALOG_EXCHANGE_FOOTPRINTS_BASE::DIALOG_EXCHANGE_FOOTPRINTS_BASE( wxWindow* pare m_specifiedID->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_EXCHANGE_FOOTPRINTS_BASE::OnMatchIDClicked ), NULL, this ); m_specifiedIDBrowseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_FOOTPRINTS_BASE::ViewAndSelectFootprint ), NULL, this ); m_newIDBrowseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_FOOTPRINTS_BASE::ViewAndSelectFootprint ), NULL, this ); + m_checkAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_FOOTPRINTS_BASE::onCheckAll ), NULL, this ); + m_uncheckAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_FOOTPRINTS_BASE::onUncheckAll ), NULL, this ); m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_FOOTPRINTS_BASE::OnOKClicked ), NULL, this ); } @@ -174,6 +207,8 @@ DIALOG_EXCHANGE_FOOTPRINTS_BASE::~DIALOG_EXCHANGE_FOOTPRINTS_BASE() m_specifiedID->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_EXCHANGE_FOOTPRINTS_BASE::OnMatchIDClicked ), NULL, this ); m_specifiedIDBrowseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_FOOTPRINTS_BASE::ViewAndSelectFootprint ), NULL, this ); m_newIDBrowseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_FOOTPRINTS_BASE::ViewAndSelectFootprint ), NULL, this ); + m_checkAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_FOOTPRINTS_BASE::onCheckAll ), NULL, this ); + m_uncheckAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_FOOTPRINTS_BASE::onUncheckAll ), NULL, this ); m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_FOOTPRINTS_BASE::OnOKClicked ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_exchange_footprints_base.fbp b/pcbnew/dialogs/dialog_exchange_footprints_base.fbp index b54e1f9613..fffde249d2 100644 --- a/pcbnew/dialogs/dialog_exchange_footprints_base.fbp +++ b/pcbnew/dialogs/dialog_exchange_footprints_base.fbp @@ -84,7 +84,7 @@ 5 2 0 - wxEXPAND|wxALL + wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL 0 1 @@ -153,7 +153,7 @@ 5 1 0 - wxALL + wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL 1 1 @@ -222,7 +222,7 @@ 5 1 0 - wxALL|wxEXPAND + wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL 2 1 @@ -291,7 +291,7 @@ 2 1 1 - wxBOTTOM|wxRIGHT|wxTOP|wxEXPAND + wxEXPAND|wxTOP|wxBOTTOM 2 1 @@ -361,7 +361,7 @@ 5 1 0 - wxEXPAND|wxALL + wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL 3 1 @@ -430,7 +430,7 @@ 2 1 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM 3 1 @@ -498,9 +498,9 @@ 5 - 2 + 1 0 - wxLEFT|wxRIGHT|wxTOP|wxEXPAND + wxALIGN_CENTER_VERTICAL|wxRIGHT 4 1 @@ -565,6 +565,162 @@ OnMatchIDClicked + + 5 + 1 + 1 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 4 + 1 + + + bSizer7 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + -1,-1 + 1 + m_specifiedID + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_PROCESS_ENTER + ; + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnMatchIDClicked + OnMatchIDClicked + + + + 2 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Browse Library + + 0 + + 0 + + + 0 + -1,-1 + 1 + m_specifiedIDBrowseButton + 1 + + + protected + 1 + + + + Resizable + 1 + + + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + ViewAndSelectFootprint + + + + @@ -576,153 +732,11 @@ bSizer4 wxHORIZONTAL none - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - 500,-1 - 1 - m_specifiedID - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_PROCESS_ENTER - ; - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnMatchIDClicked - OnMatchIDClicked - - - - 2 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Browse Library - - 0 - - 0 - - - 0 - -1,-1 - 1 - m_specifiedIDBrowseButton - 1 - - - protected - 1 - - - - Resizable - 1 - - - STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - ViewAndSelectFootprint - - - 10 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 @@ -730,8 +744,8 @@ wxVERTICAL protected - 5 - wxEXPAND|wxBOTTOM + 3 + wxEXPAND|wxTOP|wxBOTTOM 0 1 @@ -790,75 +804,75 @@ 5 - wxLEFT|wxRIGHT|wxTOP|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - New footprint library id: - 0 - - 0 - - - 0 - - 1 - newIdLabel - 1 - - - none - 1 - - Resizable - 1 - - - ; - 0 - - - - - -1 - - - - 5 - wxEXPAND|wxLEFT + wxEXPAND|wxTOP|wxBOTTOM 1 bSizer3 wxHORIZONTAL none + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + New footprint library id: + 0 + + 0 + + + 0 + + 1 + newIdLabel + 1 + + + none + 1 + + Resizable + 1 + + + ; + 0 + + + + + -1 + + 5 wxALIGN_CENTER_VERTICAL @@ -925,7 +939,7 @@ - 2 + 5 wxALIGN_CENTER_VERTICAL|wxRIGHT 0 @@ -1001,6 +1015,16 @@ + + 5 + wxEXPAND + 0 + + 3 + protected + 0 + + @@ -1012,462 +1036,654 @@ Update Options m_updateOptionsSizer - wxVERTICAL + wxHORIZONTAL 1 protected - 5 - wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Remove text items which are not in library footprint - - 0 - - - 0 + 10 + wxEXPAND|wxRIGHT + 1 + - 1 - m_removeExtraBox - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Removes fields that do not occur in the original library symbols - - wxFILTER_NONE - wxDefaultValidator - - - - + bSizer5 + wxVERTICAL + none + + 5 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Remove text items if not in library footprint + + 0 + + + 0 + + 1 + m_removeExtraBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Removes fields that do not occur in the original library symbols + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Update/reset text layers and visibilities + + 0 + + + 0 + + 1 + m_resetTextItemLayers + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Update/reset text sizes, styles and positions + + 0 + + + 0 + + 1 + m_resetTextItemEffects + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Update/reset text content + + 0 + + + 0 + + 1 + m_resetTextItemContent + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + + 1 + + 10 + protected + 0 + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Check All Update Options + + 0 + + 0 + + + 0 + + 1 + m_checkAll + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + onCheckAll + + 5 - wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Update/reset text layers and visibilities - - 0 - - - 0 + wxEXPAND + 1 + - 1 - m_resetTextItemLayers - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Update/reset text sizes, styles and positions - - 0 - - - 0 - - 1 - m_resetTextItemEffects - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Update/reset text content - - 0 - - - 0 - - 1 - m_resetTextItemContent - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Update/reset fabrication attributes - - 0 - - - 0 - - 1 - m_resetFabricationAttrs - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Update/reset clearance overrides - - 0 - - - 0 - - 1 - m_resetClearanceOverrides - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Update/reset 3D models - - 0 - - - 0 - - 1 - m_reset3DModels - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - + bSizer6 + wxVERTICAL + none + + 5 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Update/reset fabrication attributes + + 0 + + + 0 + + 1 + m_resetFabricationAttrs + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Update/reset clearance overrides + + 0 + + + 0 + + 1 + m_resetClearanceOverrides + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Update/reset 3D models + + 0 + + + 0 + + 1 + m_reset3DModels + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + + 1 + + 10 + protected + 0 + + + + 5 + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Uncheck All Update Options + + 0 + + 0 + + + 0 + + 1 + m_uncheckAll + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + onUncheckAll + + diff --git a/pcbnew/dialogs/dialog_exchange_footprints_base.h b/pcbnew/dialogs/dialog_exchange_footprints_base.h index e6ac4da308..aa4af8bdc4 100644 --- a/pcbnew/dialogs/dialog_exchange_footprints_base.h +++ b/pcbnew/dialogs/dialog_exchange_footprints_base.h @@ -21,13 +21,13 @@ class WX_HTML_REPORT_PANEL; #include #include #include -#include #include #include #include #include #include #include +#include #include #include #include @@ -64,9 +64,11 @@ class DIALOG_EXCHANGE_FOOTPRINTS_BASE : public DIALOG_SHIM wxCheckBox* m_resetTextItemLayers; wxCheckBox* m_resetTextItemEffects; wxCheckBox* m_resetTextItemContent; + wxButton* m_checkAll; wxCheckBox* m_resetFabricationAttrs; wxCheckBox* m_resetClearanceOverrides; wxCheckBox* m_reset3DModels; + wxButton* m_uncheckAll; WX_HTML_REPORT_PANEL* m_MessageWindow; wxStdDialogButtonSizer* m_sdbSizer; wxButton* m_sdbSizerOK; @@ -80,6 +82,8 @@ class DIALOG_EXCHANGE_FOOTPRINTS_BASE : public DIALOG_SHIM virtual void OnMatchValueClicked( wxCommandEvent& event ) { event.Skip(); } virtual void OnMatchIDClicked( wxCommandEvent& event ) { event.Skip(); } virtual void ViewAndSelectFootprint( wxCommandEvent& event ) { event.Skip(); } + virtual void onCheckAll( wxCommandEvent& event ) { event.Skip(); } + virtual void onUncheckAll( wxCommandEvent& event ) { event.Skip(); } virtual void OnOKClicked( wxCommandEvent& event ) { event.Skip(); } diff --git a/pcbnew/dialogs/dialog_footprint_properties.cpp b/pcbnew/dialogs/dialog_footprint_properties.cpp index fafcede400..7adeccb836 100644 --- a/pcbnew/dialogs/dialog_footprint_properties.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties.cpp @@ -53,8 +53,7 @@ int DIALOG_FOOTPRINT_PROPERTIES::m_page = 0; // remember the last open page during session -DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParent, - FOOTPRINT* aFootprint ) : +DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParent, FOOTPRINT* aFootprint ) : DIALOG_FOOTPRINT_PROPERTIES_BASE( aParent ), m_frame( aParent ), m_footprint( aFootprint ), @@ -62,12 +61,9 @@ DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParen m_posY( aParent, m_YPosLabel, m_ModPositionY, m_YPosUnit ), m_orientation( aParent, m_orientationLabel, m_orientationCtrl, nullptr ), m_netClearance( aParent, m_NetClearanceLabel, m_NetClearanceCtrl, m_NetClearanceUnits ), - m_solderMask( aParent, m_SolderMaskMarginLabel, m_SolderMaskMarginCtrl, - m_SolderMaskMarginUnits ), - m_solderPaste( aParent, m_SolderPasteMarginLabel, m_SolderPasteMarginCtrl, - m_SolderPasteMarginUnits ), - m_solderPasteRatio( aParent, m_PasteMarginRatioLabel, m_PasteMarginRatioCtrl, - m_PasteMarginRatioUnits ), + m_solderMask( aParent, m_SolderMaskMarginLabel, m_SolderMaskMarginCtrl, m_SolderMaskMarginUnits ), + m_solderPaste( aParent, m_SolderPasteMarginLabel, m_SolderPasteMarginCtrl, m_SolderPasteMarginUnits ), + m_solderPasteRatio( aParent, m_PasteMarginRatioLabel, m_PasteMarginRatioCtrl, m_PasteMarginRatioUnits ), m_returnValue( FP_PROPS_CANCEL ), m_initialized( false ), m_gridSize( 0, 0 ), @@ -101,9 +97,6 @@ DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParen icon.CopyFromBitmap( KiBitmap( BITMAPS::icon_modedit ) ); SetIcon( icon ); - // Give a bit more room for combobox editors - m_itemsGrid->SetDefaultRowSize( m_itemsGrid->GetDefaultRowSize() + 4 ); - m_itemsGrid->SetTable( m_fields ); m_itemsGrid->PushEventHandler( new GRID_TRICKS( m_itemsGrid ) ); diff --git a/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp index 42594604c3..66cb8b4f62 100644 --- a/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp @@ -125,20 +125,16 @@ void PRIVATE_LAYERS_GRID_TABLE::SetValueAsLong( int aRow, int aCol, long aValue NOTEBOOK_PAGES DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::m_page = NOTEBOOK_PAGES::PAGE_GENERAL; -DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR( - FOOTPRINT_EDIT_FRAME* aParent, - FOOTPRINT* aFootprint ) : +DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR( FOOTPRINT_EDIT_FRAME* aParent, + FOOTPRINT* aFootprint ) : DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE( aParent ), m_frame( aParent ), m_footprint( aFootprint ), m_initialized( false ), m_netClearance( aParent, m_NetClearanceLabel, m_NetClearanceCtrl, m_NetClearanceUnits ), - m_solderMask( aParent, m_SolderMaskMarginLabel, m_SolderMaskMarginCtrl, - m_SolderMaskMarginUnits ), - m_solderPaste( aParent, m_SolderPasteMarginLabel, m_SolderPasteMarginCtrl, - m_SolderPasteMarginUnits ), - m_solderPasteRatio( aParent, m_PasteMarginRatioLabel, m_PasteMarginRatioCtrl, - m_PasteMarginRatioUnits ), + m_solderMask( aParent, m_SolderMaskMarginLabel, m_SolderMaskMarginCtrl, m_SolderMaskMarginUnits ), + m_solderPaste( aParent, m_SolderPasteMarginLabel, m_SolderPasteMarginCtrl, m_SolderPasteMarginUnits ), + m_solderPasteRatio( aParent, m_PasteMarginRatioLabel, m_PasteMarginRatioCtrl, m_PasteMarginRatioUnits ), m_gridSize( 0, 0 ), m_lastRequestedSize( 0, 0 ) { @@ -166,10 +162,6 @@ DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR( icon.CopyFromBitmap( KiBitmap( BITMAPS::icon_modedit ) ); SetIcon( icon ); - // Give a bit more room for combobox editors - m_itemsGrid->SetDefaultRowSize( m_itemsGrid->GetDefaultRowSize() + 4 ); - m_privateLayersGrid->SetDefaultRowSize( m_privateLayersGrid->GetDefaultRowSize() + 4 ); - m_itemsGrid->SetTable( m_fields ); m_privateLayersGrid->SetTable( m_privateLayers ); diff --git a/pcbnew/dialogs/dialog_swap_layers.cpp b/pcbnew/dialogs/dialog_swap_layers.cpp index 4752d3cd1d..8ac1a17dea 100644 --- a/pcbnew/dialogs/dialog_swap_layers.cpp +++ b/pcbnew/dialogs/dialog_swap_layers.cpp @@ -84,14 +84,13 @@ public: DIALOG_SWAP_LAYERS::DIALOG_SWAP_LAYERS( PCB_BASE_EDIT_FRAME* aParent, std::map& aLayerMap ) : - DIALOG_SWAP_LAYERS_BASE( aParent ), - m_parent( aParent ), - m_layerMap( aLayerMap ) + DIALOG_SWAP_LAYERS_BASE( aParent ), + m_parent( aParent ), + m_layerMap( aLayerMap ) { m_gridTable = new LAYER_GRID_TABLE( m_parent->GetBoard()->GetCopperLayerCount() ); m_grid->SetTable( m_gridTable ); m_grid->SetMinSize( FromDIP( m_grid->GetMinSize() ) ); - m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() + FromDIP( 4 ) ); m_grid->SetCellHighlightROPenWidth( 0 ); m_grid->SetUseNativeColLabels(); diff --git a/pcbnew/dialogs/panel_display_options.cpp b/pcbnew/dialogs/panel_display_options.cpp index 9f6e206d97..fbf62409dc 100644 --- a/pcbnew/dialogs/panel_display_options.cpp +++ b/pcbnew/dialogs/panel_display_options.cpp @@ -155,8 +155,6 @@ PANEL_DISPLAY_OPTIONS::PANEL_DISPLAY_OPTIONS( wxWindow* aParent, APP_SETTINGS_BA m_optionsBook->SetSelection( m_isPCBEdit ? 1 : 0 ); - m_layerNameitemsGrid->SetDefaultRowSize( m_layerNameitemsGrid->GetDefaultRowSize() + 4 ); - m_layerNameitemsGrid->SetTable( new LAYER_NAMES_GRID_TABLE(), true ); m_layerNameitemsGrid->PushEventHandler( new GRID_TRICKS( m_layerNameitemsGrid ) ); m_layerNameitemsGrid->SetSelectionMode( wxGrid::wxGridSelectRows ); @@ -191,9 +189,9 @@ void PANEL_DISPLAY_OPTIONS::loadFPSettings( const FOOTPRINT_EDITOR_SETTINGS* aCf { wxGridTableBase* table = m_layerNameitemsGrid->GetTable(); - for( auto& item : aCfg->m_DesignSettings.m_UserLayerNames ) + for( const auto& [canonicalName, userName] : aCfg->m_DesignSettings.m_UserLayerNames ) { - wxString orig_name = item.first; + wxString orig_name = canonicalName; int layer = LSET::NameToLayer( orig_name ); if( !IsUserLayer( static_cast( layer ) ) ) @@ -202,7 +200,7 @@ void PANEL_DISPLAY_OPTIONS::loadFPSettings( const FOOTPRINT_EDITOR_SETTINGS* aCf int row = m_layerNameitemsGrid->GetNumberRows(); table->AppendRows( 1 ); table->SetValueAsLong( row, 0, layer ); - table->SetValue( row, 1, item.second ); + table->SetValue( row, 1, userName ); } Layout(); @@ -284,8 +282,7 @@ void PANEL_DISPLAY_OPTIONS::onLayerChange( wxGridEvent& event ) for( int i = 0; i < m_layerNameitemsGrid->GetNumberRows(); ++i ) { - if( i != event.GetRow() - && table->GetValueAsLong( i, 0 ) == layer ) + if( i != event.GetRow() && table->GetValueAsLong( i, 0 ) == layer ) { table->SetValueAsLong( event.GetRow(), 0, getNextAvailableLayer() ); return; diff --git a/pcbnew/dialogs/panel_fp_editor_field_defaults.cpp b/pcbnew/dialogs/panel_fp_editor_field_defaults.cpp index 0135b1b600..7667ef0350 100644 --- a/pcbnew/dialogs/panel_fp_editor_field_defaults.cpp +++ b/pcbnew/dialogs/panel_fp_editor_field_defaults.cpp @@ -175,11 +175,10 @@ static FOOTPRINT_EDITOR_SETTINGS& GetPgmSettings() PANEL_FP_EDITOR_FIELD_DEFAULTS::PANEL_FP_EDITOR_FIELD_DEFAULTS( wxWindow* aParent, UNITS_PROVIDER* aUnitsProvider ) : - PANEL_FP_EDITOR_FIELD_DEFAULTS_BASE( aParent ), m_unitProvider( aUnitsProvider ), + PANEL_FP_EDITOR_FIELD_DEFAULTS_BASE( aParent ), + m_unitProvider( aUnitsProvider ), m_designSettings( GetPgmSettings().m_DesignSettings ) { - m_fieldPropsGrid->SetDefaultRowSize( m_fieldPropsGrid->GetDefaultRowSize() + 4 ); - m_fieldPropsGrid->SetTable( new TEXT_ITEMS_GRID_TABLE( true ), true ); m_fieldPropsGrid->PushEventHandler( new GRID_TRICKS( m_fieldPropsGrid ) ); m_fieldPropsGrid->SetSelectionMode( wxGrid::wxGridSelectRows ); @@ -195,8 +194,6 @@ PANEL_FP_EDITOR_FIELD_DEFAULTS::PANEL_FP_EDITOR_FIELD_DEFAULTS( wxWindow* attr->SetEditor( new GRID_CELL_LAYER_SELECTOR( nullptr, {} ) ); m_fieldPropsGrid->SetColAttr( 2, attr ); - m_textItemsGrid->SetDefaultRowSize( m_textItemsGrid->GetDefaultRowSize() + 4 ); - m_textItemsGrid->SetTable( new TEXT_ITEMS_GRID_TABLE( false ), true ); m_textItemsGrid->PushEventHandler( new GRID_TRICKS( m_textItemsGrid ) ); m_textItemsGrid->SetSelectionMode( wxGrid::wxGridSelectRows ); diff --git a/pcbnew/dialogs/panel_fp_editor_graphics_defaults.cpp b/pcbnew/dialogs/panel_fp_editor_graphics_defaults.cpp index 25d2c1e72a..b70f01965b 100644 --- a/pcbnew/dialogs/panel_fp_editor_graphics_defaults.cpp +++ b/pcbnew/dialogs/panel_fp_editor_graphics_defaults.cpp @@ -64,18 +64,18 @@ static FOOTPRINT_EDITOR_SETTINGS& GetPgmSettings() } -PANEL_FP_EDITOR_GRAPHICS_DEFAULTS::PANEL_FP_EDITOR_GRAPHICS_DEFAULTS( - wxWindow* aParent, UNITS_PROVIDER* aUnitsProvider ) : - PANEL_FP_EDITOR_GRAPHICS_DEFAULTS_BASE( aParent ), m_unitProvider( aUnitsProvider ), +PANEL_FP_EDITOR_GRAPHICS_DEFAULTS::PANEL_FP_EDITOR_GRAPHICS_DEFAULTS( wxWindow* aParent, + UNITS_PROVIDER* aUnitsProvider ) : + PANEL_FP_EDITOR_GRAPHICS_DEFAULTS_BASE( aParent ), + m_unitProvider( aUnitsProvider ), m_designSettings( GetPgmSettings().m_DesignSettings ), - m_dimensionsPanel( std::make_unique( this, *m_unitProvider, - m_designSettings ) ) + m_dimensionsPanel( std::make_unique( this, *m_unitProvider, m_designSettings ) ) { m_graphicsGrid->SetUnitsProvider( aUnitsProvider ); - m_graphicsGrid->SetAutoEvalCols( - { COL_LINE_THICKNESS, COL_TEXT_WIDTH, COL_TEXT_HEIGHT, COL_TEXT_THICKNESS } ); - - m_graphicsGrid->SetDefaultRowSize( m_graphicsGrid->GetDefaultRowSize() + 4 ); + m_graphicsGrid->SetAutoEvalCols( { COL_LINE_THICKNESS, + COL_TEXT_WIDTH, + COL_TEXT_HEIGHT, + COL_TEXT_THICKNESS } ); // Work around a bug in wxWidgets where it fails to recalculate the grid height // after changing the default row size @@ -140,13 +140,11 @@ void PANEL_FP_EDITOR_GRAPHICS_DEFAULTS::loadFPSettings( const FOOTPRINT_EDITOR_S for( int col = 0; col < m_graphicsGrid->GetNumberCols(); col++ ) { // Set the minimal width to the column label size. - m_graphicsGrid->SetColMinimalWidth( col, - m_graphicsGrid->GetVisibleWidth( col, true, false ) ); + m_graphicsGrid->SetColMinimalWidth( col, m_graphicsGrid->GetVisibleWidth( col, true, false ) ); // Set the width to see the full contents if( m_graphicsGrid->IsColShown( col ) ) - m_graphicsGrid->SetColSize( col, - m_graphicsGrid->GetVisibleWidth( col, true, true, true ) ); + m_graphicsGrid->SetColSize( col, m_graphicsGrid->GetVisibleWidth( col, true, true, true ) ); } m_graphicsGrid->SetRowLabelSize( m_graphicsGrid->GetVisibleWidth( -1, true, true, true ) ); @@ -225,8 +223,7 @@ bool PANEL_FP_EDITOR_GRAPHICS_DEFAULTS::TransferDataFromWindow() int textHeight = m_graphicsGrid->GetUnitValue( i, COL_TEXT_HEIGHT ); int textThickness = m_graphicsGrid->GetUnitValue( i, COL_TEXT_THICKNESS ); - if( textWidth < minSize || textHeight < minSize || textWidth > maxSize - || textHeight > maxSize ) + if( textWidth < minSize || textHeight < minSize || textWidth > maxSize || textHeight > maxSize ) { if( !errorsMsg.IsEmpty() ) errorsMsg += wxT( "\n\n" ); @@ -249,17 +246,19 @@ bool PANEL_FP_EDITOR_GRAPHICS_DEFAULTS::TransferDataFromWindow() errorsMsg += wxT( "\n\n" ); if( textThickness > textMaxThickness ) - errorsMsg += wxString::Format( - _( "%s: Text thickness is too large.\n" - "It will be truncated to %s" ), - m_graphicsGrid->GetRowLabelValue( i ), - m_unitProvider->StringFromValue( textMaxThickness, true ) ); - + { + errorsMsg += wxString::Format( _( "%s: Text thickness is too large.\n" + "It will be truncated to %s" ), + m_graphicsGrid->GetRowLabelValue( i ), + m_unitProvider->StringFromValue( textMaxThickness, true ) ); + } else if( textThickness < minWidth ) + { errorsMsg += wxString::Format( _( "%s: Text thickness is too small.\n" "It will be truncated to %s" ), m_graphicsGrid->GetRowLabelValue( i ), m_unitProvider->StringFromValue( minWidth, true ) ); + } textThickness = std::min( textThickness, textMaxThickness ); textThickness = std::max( textThickness, minWidth ); @@ -281,8 +280,7 @@ bool PANEL_FP_EDITOR_GRAPHICS_DEFAULTS::TransferDataFromWindow() if( errorsMsg.IsEmpty() ) return true; - KIDIALOG dlg( wxGetTopLevelParent( this ), errorsMsg, KIDIALOG::KD_ERROR, - _( "Parameter error" ) ); + KIDIALOG dlg( wxGetTopLevelParent( this ), errorsMsg, KIDIALOG::KD_ERROR, _( "Parameter error" ) ); dlg.ShowModal(); return false; diff --git a/pcbnew/dialogs/panel_fp_lib_table.cpp b/pcbnew/dialogs/panel_fp_lib_table.cpp index ed63bc8b03..d4196a1597 100644 --- a/pcbnew/dialogs/panel_fp_lib_table.cpp +++ b/pcbnew/dialogs/panel_fp_lib_table.cpp @@ -75,83 +75,6 @@ #include #include -// clang-format off - -/** - * Container that describes file type info for the add a library options - */ -struct SUPPORTED_FILE_TYPE -{ - wxString m_Description; ///< Description shown in the file picker dialog - wxString m_FileFilter; ///< Filter used for file pickers if m_IsFile is true - wxString m_FolderSearchExtension; ///< In case of folders it stands for extensions of files stored inside - bool m_IsFile; ///< Whether the library is a folder or a file - PCB_IO_MGR::PCB_FILE_T m_Plugin; -}; - -// clang-format on - -/** - * Traverser implementation that looks to find any and all "folder" libraries by looking for files - * with a specific extension inside folders - */ -class LIBRARY_TRAVERSER : public wxDirTraverser -{ -public: - LIBRARY_TRAVERSER( std::vector aSearchExtensions, wxString aInitialDir ) : - m_searchExtensions( aSearchExtensions ), m_currentDir( aInitialDir ) - { - } - - virtual wxDirTraverseResult OnFile( const wxString& aFileName ) override - { - wxFileName file( aFileName ); - - for( const std::string& ext : m_searchExtensions ) - { - if( file.GetExt().IsSameAs( ext, false ) ) - m_foundDirs.insert( { m_currentDir, 1 } ); - } - - return wxDIR_CONTINUE; - } - - virtual wxDirTraverseResult OnOpenError( const wxString& aOpenErrorName ) override - { - m_failedDirs.insert( { aOpenErrorName, 1 } ); - return wxDIR_IGNORE; - } - - bool HasDirectoryOpenFailures() - { - return m_failedDirs.size() > 0; - } - - virtual wxDirTraverseResult OnDir( const wxString& aDirName ) override - { - m_currentDir = aDirName; - return wxDIR_CONTINUE; - } - - void GetPaths( wxArrayString& aPathArray ) - { - for( std::pair& foundDirsPair : m_foundDirs ) - aPathArray.Add( foundDirsPair.first ); - } - - void GetFailedPaths( wxArrayString& aPathArray ) - { - for( std::pair& failedDirsPair : m_failedDirs ) - aPathArray.Add( failedDirsPair.first ); - } - -private: - std::vector m_searchExtensions; - wxString m_currentDir; - std::unordered_map m_foundDirs; - std::unordered_map m_failedDirs; -}; - /** * This class builds a wxGridTableBase by wrapping an #FP_LIB_TABLE object. @@ -394,12 +317,12 @@ PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, PRO FP_LIB_TABLE* aGlobalTable, const wxString& aGlobalTblPath, FP_LIB_TABLE* aProjectTable, const wxString& aProjectTblPath, const wxString& aProjectBasePath ) : - PANEL_FP_LIB_TABLE_BASE( aParent ), - m_globalTable( aGlobalTable ), - m_projectTable( aProjectTable ), - m_project( aProject ), - m_projectBasePath( aProjectBasePath ), - m_parent( aParent ) + PANEL_FP_LIB_TABLE_BASE( aParent ), + m_globalTable( aGlobalTable ), + m_projectTable( aProjectTable ), + m_project( aProject ), + m_projectBasePath( aProjectBasePath ), + m_parent( aParent ) { m_global_grid->SetTable( new FP_LIB_TABLE_GRID( *aGlobalTable ), true ); @@ -484,8 +407,7 @@ PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, PRO if( desc.m_IsFile && !desc.m_FileExtensions.empty() ) { - entryStr << wxString::Format( wxS( " (%s)" ), - joinExts( desc.m_FileExtensions ) ); + entryStr << wxString::Format( wxS( " (%s)" ), joinExts( desc.m_FileExtensions ) ); } else if( !desc.m_IsFile && !desc.m_ExtensionsInDir.empty() ) { @@ -497,8 +419,7 @@ PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, PRO browseMenu->Append( type, entryStr ); - browseMenu->Bind( wxEVT_COMMAND_MENU_SELECTED, &PANEL_FP_LIB_TABLE::browseLibrariesHandler, - this, type ); + browseMenu->Bind( wxEVT_COMMAND_MENU_SELECTED, &PANEL_FP_LIB_TABLE::browseLibrariesHandler, this, type ); } Layout(); @@ -634,8 +555,7 @@ bool PANEL_FP_LIB_TABLE::verifyTables() if( nick1 == nick2 ) { - msg = wxString::Format( _( "Multiple libraries cannot share the same " - "nickname ('%s')." ), + msg = wxString::Format( _( "Multiple libraries cannot share the same nickname ('%s')." ), nick1 ); // show the tabbed panel holding the grid we have flunked: @@ -841,14 +761,12 @@ void PANEL_FP_LIB_TABLE::onMigrateLibraries( wxCommandEvent& event ) { if( rowsToMigrate.size() == 1 ) { - msg.Printf( _( "Save '%s' as current KiCad format " - "and replace entry in table?" ), + msg.Printf( _( "Save '%s' as current KiCad format and replace entry in table?" ), m_cur_grid->GetCellValue( rowsToMigrate[0], COL_NICKNAME ) ); } else { - msg.Printf( _( "Save %d libraries as current KiCad format " - "and replace entries in table?" ), + msg.Printf( _( "Save %d libraries as current KiCad format and replace entries in table?" ), (int) rowsToMigrate.size() ); } @@ -880,8 +798,7 @@ void PANEL_FP_LIB_TABLE::onMigrateLibraries( wxCommandEvent& event ) msg.Printf( _( "Folder '%s' already exists. Do you want overwrite any existing footprints?" ), newLib.GetFullPath() ); - switch( wxMessageBox( msg, _( "Migrate Library" ), - wxYES_NO | wxCANCEL | wxICON_QUESTION, m_parent ) ) + switch( wxMessageBox( msg, _( "Migrate Library" ), wxYES_NO|wxCANCEL|wxICON_QUESTION, m_parent ) ) { case wxYES: break; case wxNO: continue; @@ -892,11 +809,10 @@ void PANEL_FP_LIB_TABLE::onMigrateLibraries( wxCommandEvent& event ) wxString options = m_cur_grid->GetCellValue( row, COL_OPTIONS ); std::unique_ptr> props( LIB_TABLE::ParseOptions( options.ToStdString() ) ); - if( PCB_IO_MGR::ConvertLibrary( props.get(), legacyLib.GetFullPath(), - newLib.GetFullPath(), errorReporter.m_Reporter ) ) + if( PCB_IO_MGR::ConvertLibrary( props.get(), legacyLib.GetFullPath(), newLib.GetFullPath(), + errorReporter.m_Reporter ) ) { - relPath = NormalizePath( newLib.GetFullPath(), &Pgm().GetLocalEnvVariables(), - m_project ); + relPath = NormalizePath( newLib.GetFullPath(), &Pgm().GetLocalEnvVariables(), m_project ); // Do not use the project path in the global library table. This will almost // assuredly be wrong for a different project. @@ -942,8 +858,7 @@ void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event ) if( fileType == PCB_IO_MGR::FILE_TYPE_NONE ) { - wxLogWarning( wxT( "File type selection event received but could not find the file type " - "in the table" ) ); + wxLogWarning( wxT( "File type selection event received but could not find the file type in the table" ) ); return; } @@ -1213,10 +1128,6 @@ void PANEL_FP_LIB_TABLE::populateEnvironReadOnlyTable() m_path_subs_grid->SetCellEditor( row, 1, new GRID_CELL_READONLY_TEXT_EDITOR() ); } - // No combobox editors here, but it looks better if its consistent with the other - // grids in the dialog. - m_path_subs_grid->SetDefaultRowSize( m_path_subs_grid->GetDefaultRowSize() + 2 ); - adjustPathSubsGridColumns( m_path_subs_grid->GetRect().GetWidth() ); } diff --git a/pcbnew/dialogs/panel_fp_properties_3d_model.cpp b/pcbnew/dialogs/panel_fp_properties_3d_model.cpp index a71a82c72d..ff82d301f3 100644 --- a/pcbnew/dialogs/panel_fp_properties_3d_model.cpp +++ b/pcbnew/dialogs/panel_fp_properties_3d_model.cpp @@ -79,8 +79,6 @@ PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL( PCB_BASE_EDIT_FRAME* m_splitter1->SetSashPosition( FromDIP( m_splitter1->GetSashPosition() ) ); m_splitter1->SetMinimumPaneSize( FromDIP( m_splitter1->GetMinimumPaneSize() ) ); - m_modelsGrid->SetDefaultRowSize( m_modelsGrid->GetDefaultRowSize() + 4 ); - GRID_TRICKS* trick = new GRID_TRICKS( m_modelsGrid, [this]( wxCommandEvent& aEvent ) { OnAdd3DRow( aEvent ); @@ -125,8 +123,7 @@ PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL( PCB_BASE_EDIT_FRAME* PROJECT_PCB::Get3DCacheManager( &m_frame->Prj() )->GetResolver()->SetProgramBase( &Pgm() ); - m_previewPane = new PANEL_PREVIEW_3D_MODEL( m_lowerPanel, m_frame, m_footprint, - &m_shapes3D_list ); + m_previewPane = new PANEL_PREVIEW_3D_MODEL( m_lowerPanel, m_frame, m_footprint, &m_shapes3D_list ); m_LowerSizer3D->Add( m_previewPane, 1, wxEXPAND, 5 ); @@ -503,8 +500,7 @@ void PANEL_FP_PROPERTIES_3D_MODEL::updateValidateStatus( int aRow ) } m_modelsGrid->SetCellValue( aRow, COL_PROBLEM, errStr ); - m_modelsGrid->SetCellRenderer( aRow, COL_PROBLEM, - new GRID_CELL_STATUS_ICON_RENDERER( icon ) ); + m_modelsGrid->SetCellRenderer( aRow, COL_PROBLEM, new GRID_CELL_STATUS_ICON_RENDERER( icon ) ); } @@ -524,6 +520,7 @@ MODEL_VALIDATE_ERRORS PANEL_FP_PROPERTIES_3D_MODEL::validateModelExists( const w wxString libraryName = m_footprint->GetFPID().GetLibNickname(); const FP_LIB_TABLE_ROW* fpRow = nullptr; + try { fpRow = PROJECT_PCB::PcbFootprintLibs( &m_frame->Prj() )->FindRow( libraryName, false ); @@ -568,8 +565,7 @@ void PANEL_FP_PROPERTIES_3D_MODEL::AdjustGridColumnWidths() // Account for scroll bars int modelsWidth = KIPLATFORM::UI::GetUnobscuredSize( m_modelsGrid ).x; - int width = modelsWidth - m_modelsGrid->GetColSize( COL_SHOWN ) - - m_modelsGrid->GetColSize( COL_PROBLEM ); + int width = modelsWidth - m_modelsGrid->GetColSize( COL_SHOWN ) - m_modelsGrid->GetColSize( COL_PROBLEM ); if( width > 0 ) m_modelsGrid->SetColSize( COL_FILENAME, width ); @@ -606,8 +602,7 @@ void PANEL_FP_PROPERTIES_3D_MODEL::onShowEvent( wxShowEvent& aEvent ) void PANEL_FP_PROPERTIES_3D_MODEL::onDialogActivateEvent( wxActivateEvent& aEvent ) { - postCustomPanelShownEventWithPredicate( aEvent.GetActive() - && m_previewPane->IsShownOnScreen() ); + postCustomPanelShownEventWithPredicate( aEvent.GetActive() && m_previewPane->IsShownOnScreen() ); aEvent.Skip(); } diff --git a/pcbnew/dialogs/panel_setup_text_and_graphics.cpp b/pcbnew/dialogs/panel_setup_text_and_graphics.cpp index cd34112dc1..347fbd58d2 100644 --- a/pcbnew/dialogs/panel_setup_text_and_graphics.cpp +++ b/pcbnew/dialogs/panel_setup_text_and_graphics.cpp @@ -61,15 +61,13 @@ PANEL_SETUP_TEXT_AND_GRAPHICS::PANEL_SETUP_TEXT_AND_GRAPHICS( wxWindow* aP PANEL_SETUP_TEXT_AND_GRAPHICS_BASE( aParentWindow ), m_Frame( aFrame ), m_BrdSettings( &m_Frame->GetBoard()->GetDesignSettings() ), - m_dimensionsPanel( - std::make_unique( this, *aFrame, *m_BrdSettings ) ) + m_dimensionsPanel( std::make_unique( this, *aFrame, *m_BrdSettings ) ) { m_grid->SetUnitsProvider( m_Frame ); m_grid->SetAutoEvalCols( { COL_LINE_THICKNESS, COL_TEXT_WIDTH, COL_TEXT_HEIGHT, COL_TEXT_THICKNESS } ); - m_grid->SetDefaultRowSize( m_grid->GetDefaultRowSize() + FromDIP( 4 ) ); m_grid->SetUseNativeColLabels(); // Work around a bug in wxWidgets where it fails to recalculate the grid height @@ -157,10 +155,10 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataToWindow() SET_MILS_CELL( i, COL_TEXT_WIDTH, m_BrdSettings->m_TextSize[ i ].x ); SET_MILS_CELL( i, COL_TEXT_HEIGHT, m_BrdSettings->m_TextSize[ i ].y ); SET_MILS_CELL( i, COL_TEXT_THICKNESS, m_BrdSettings->m_TextThickness[ i ] ); - m_grid->SetCellValue( i, COL_TEXT_ITALIC, - m_BrdSettings->m_TextItalic[ i ] ? wxT( "1" ) : wxT( "" ) ); - m_grid->SetCellValue( i, COL_TEXT_UPRIGHT, - m_BrdSettings->m_TextUpright[ i ] ? wxT( "1" ) : wxT( "" ) ); + m_grid->SetCellValue( i, COL_TEXT_ITALIC, m_BrdSettings->m_TextItalic[ i ] ? wxT( "1" ) + : wxT( "" ) ); + m_grid->SetCellValue( i, COL_TEXT_UPRIGHT, m_BrdSettings->m_TextUpright[ i ] ? wxT( "1" ) + : wxT( "" ) ); auto attr = new wxGridCellAttr; attr->SetRenderer( new wxGridCellBoolRenderer() ); @@ -233,8 +231,7 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataFromWindow() int textHeight = m_grid->GetUnitValue( i, COL_TEXT_HEIGHT ); int textThickness = m_grid->GetUnitValue( i, COL_TEXT_THICKNESS ); - if( textWidth < minSize || textHeight < minSize - || textWidth > maxSize || textHeight > maxSize ) + if( textWidth < minSize || textHeight < minSize || textWidth > maxSize || textHeight > maxSize ) { if( !errorsMsg.IsEmpty() ) errorsMsg += wxT( "\n\n" ); @@ -255,18 +252,20 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataFromWindow() if( !errorsMsg.IsEmpty() ) errorsMsg += wxT( "\n\n" ); - if( textThickness > textMaxThickness ) + { errorsMsg += wxString::Format( _( "%s: Text thickness is too large.\n" "It will be truncated to %s" ), m_grid->GetRowLabelValue( i ), unitProvider->StringFromValue( textMaxThickness , true) ); - + } else if( textThickness < minWidth ) + { errorsMsg += wxString::Format( _( "%s: Text thickness is too small.\n" "It will be truncated to %s" ), m_grid->GetRowLabelValue( i ), unitProvider->StringFromValue( minWidth , true ) ); + } textThickness = std::min( textThickness, textMaxThickness ); textThickness = std::max( textThickness, minWidth ); @@ -290,8 +289,7 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataFromWindow() if( errorsMsg.IsEmpty() ) return true; - KIDIALOG dlg( wxGetTopLevelParent( this ), errorsMsg, KIDIALOG::KD_ERROR, - _( "Parameter error" ) ); + KIDIALOG dlg( wxGetTopLevelParent( this ), errorsMsg, KIDIALOG::KD_ERROR, _( "Parameter error" ) ); dlg.ShowModal(); return false; diff --git a/pcbnew/dialogs/panel_setup_time_domain_parameters.cpp b/pcbnew/dialogs/panel_setup_time_domain_parameters.cpp index 9da83d553e..e1e064cd79 100644 --- a/pcbnew/dialogs/panel_setup_time_domain_parameters.cpp +++ b/pcbnew/dialogs/panel_setup_time_domain_parameters.cpp @@ -34,10 +34,12 @@ #include PANEL_SETUP_TIME_DOMAIN_PARAMETERS::PANEL_SETUP_TIME_DOMAIN_PARAMETERS( - wxWindow* aParentWindow, PCB_EDIT_FRAME* aFrame, BOARD* aBoard, - std::shared_ptr aTimeDomainParameters ) : + wxWindow* aParentWindow, PCB_EDIT_FRAME* aFrame, BOARD* aBoard, + std::shared_ptr aTimeDomainParameters ) : PANEL_SETUP_TIME_DOMAIN_PARAMETERS_BASE( aParentWindow ), - m_timeDomainParameters( std::move( aTimeDomainParameters ) ), m_frame( aFrame ), m_board( aFrame->GetBoard() ) + m_timeDomainParameters( std::move( aTimeDomainParameters ) ), + m_frame( aFrame ), + m_board( aFrame->GetBoard() ) { m_timeDomainParametersPane->SetBorders( true, false, false, false ); @@ -55,7 +57,6 @@ PANEL_SETUP_TIME_DOMAIN_PARAMETERS::PANEL_SETUP_TIME_DOMAIN_PARAMETERS( m_tracePropagationGrid->SetUseNativeColLabels(); m_tracePropagationGrid->EnsureColLabelsVisible(); - m_tracePropagationGrid->SetDefaultRowSize( m_tracePropagationGrid->GetDefaultRowSize() + 4 ); m_tracePropagationGrid->PushEventHandler( new GRID_TRICKS( m_tracePropagationGrid ) ); m_tracePropagationGrid->SetSelectionMode( wxGrid::wxGridSelectRows ); @@ -73,7 +74,6 @@ PANEL_SETUP_TIME_DOMAIN_PARAMETERS::PANEL_SETUP_TIME_DOMAIN_PARAMETERS( m_viaPropagationGrid->SetUseNativeColLabels(); m_viaPropagationGrid->EnsureColLabelsVisible(); - m_viaPropagationGrid->SetDefaultRowSize( m_viaPropagationGrid->GetDefaultRowSize() + 4 ); m_viaPropagationGrid->PushEventHandler( new GRID_TRICKS( m_viaPropagationGrid ) ); m_viaPropagationGrid->SetSelectionMode( wxGrid::wxGridSelectRows ); @@ -169,9 +169,7 @@ void PANEL_SETUP_TIME_DOMAIN_PARAMETERS::addProfileRow( const DELAY_PROFILE& aDe int col = m_copperLayerIdsToColumns[layerId]; if( col < m_tracePropagationGrid->GetNumberCols() ) - { m_tracePropagationGrid->SetUnitValue( rowId, col, velocity ); - } } } diff --git a/pcbnew/dialogs/panel_setup_tracks_and_vias.cpp b/pcbnew/dialogs/panel_setup_tracks_and_vias.cpp index d74b1a5092..86958ced7a 100644 --- a/pcbnew/dialogs/panel_setup_tracks_and_vias.cpp +++ b/pcbnew/dialogs/panel_setup_tracks_and_vias.cpp @@ -53,7 +53,7 @@ enum DIFF_VAR_GRID_COLUMNS PANEL_SETUP_TRACKS_AND_VIAS::PANEL_SETUP_TRACKS_AND_VIAS( wxWindow* aParentWindow, PCB_EDIT_FRAME* aFrame ) : - PANEL_SETUP_TRACKS_AND_VIAS_BASE( aParentWindow ) + PANEL_SETUP_TRACKS_AND_VIAS_BASE( aParentWindow ) { m_Frame = aFrame; m_Pcb = m_Frame->GetBoard(); @@ -69,12 +69,6 @@ PANEL_SETUP_TRACKS_AND_VIAS::PANEL_SETUP_TRACKS_AND_VIAS( wxWindow* aParentWindo m_diffPairsSortButton->SetBitmap( KiBitmapBundle( BITMAPS::small_sort_desc ) ); m_diffPairsRemoveButton->SetBitmap( KiBitmapBundle( BITMAPS::small_trash ) ); - // Membership combobox editors require a bit more room, so increase the row size of - // all our grids for consistency - m_trackWidthsGrid->SetDefaultRowSize( m_trackWidthsGrid->GetDefaultRowSize() + FromDIP( 4 ) ); - m_viaSizesGrid->SetDefaultRowSize( m_viaSizesGrid->GetDefaultRowSize() + FromDIP( 4 ) ); - m_diffPairsGrid->SetDefaultRowSize( m_diffPairsGrid->GetDefaultRowSize() + FromDIP( 4 ) ); - m_trackWidthsGrid->PushEventHandler( new GRID_TRICKS( m_trackWidthsGrid, [this]( wxCommandEvent& aEvent ) { @@ -322,7 +316,7 @@ bool PANEL_SETUP_TRACKS_AND_VIAS::TransferDataFromWindow() diffPair_dim.m_Width = m_diffPairsGrid->GetUnitValue( row, DP_WIDTH_COL ); if( !m_diffPairsGrid->GetCellValue( row, DP_GAP_COL ).IsEmpty() ) - diffPair_dim.m_Gap = m_diffPairsGrid->GetUnitValue( row, DP_GAP_COL ); + diffPair_dim.m_Gap = m_diffPairsGrid->GetUnitValue( row, DP_GAP_COL ); if( !m_diffPairsGrid->GetCellValue( row, DP_VIA_GAP_COL ).IsEmpty() ) diffPair_dim.m_ViaGap = m_diffPairsGrid->GetUnitValue( row, DP_VIA_GAP_COL ); @@ -441,7 +435,7 @@ void removeSelectedRows( WX_GRID* aGrid ) if( selectedRows.empty() && curRow >= 0 && curRow < aGrid->GetNumberRows() ) selectedRows.Add( curRow ); - for( int ii = selectedRows.Count() - 1; ii >= 0; --ii ) + for( int ii = (int) selectedRows.Count() - 1; ii >= 0; --ii ) { int row = selectedRows.Item( ii ); aGrid->DeleteRows( row, 1 ); diff --git a/pcbnew/exporters/export_hyperlynx.cpp b/pcbnew/exporters/export_hyperlynx.cpp index f9b19e487c..f10923e37b 100644 --- a/pcbnew/exporters/export_hyperlynx.cpp +++ b/pcbnew/exporters/export_hyperlynx.cpp @@ -303,9 +303,9 @@ bool HYPERLYNX_EXPORTER::writeBoardInfo() const SEG& s = outl.CSegment( i ); m_out->Print( 1, "(PERIMETER_SEGMENT X1=%.9f Y1=%.9f X2=%.9f Y2=%.9f)\n", iu2hyp( s.A.x ), - iu2hyp( s.A.y ), + iu2hyp( -s.A.y ), iu2hyp( s.B.x ), - iu2hyp( s.B.y ) ); + iu2hyp( -s.B.y ) ); } } @@ -447,7 +447,7 @@ bool HYPERLYNX_EXPORTER::writeNetObjects( const std::vector& aObjec m_out->Print( 1, "(PIN X=%.10f Y=%.10f R=\"%s.%s\" P=%d)\n", iu2hyp( pad->GetPosition().x ), - iu2hyp( pad->GetPosition().y ), + iu2hyp( -pad->GetPosition().y ), (const char*) ref.c_str(), (const char*) padName.c_str(), pstackIter->second->GetId() ); @@ -461,7 +461,7 @@ bool HYPERLYNX_EXPORTER::writeNetObjects( const std::vector& aObjec { m_out->Print( 1, "(VIA X=%.10f Y=%.10f P=%d)\n", iu2hyp( via->GetPosition().x ), - iu2hyp( via->GetPosition().y ), + iu2hyp( -via->GetPosition().y ), pstackIter->second->GetId() ); } } @@ -471,9 +471,9 @@ bool HYPERLYNX_EXPORTER::writeNetObjects( const std::vector& aObjec m_out->Print( 1, "(SEG X1=%.10f Y1=%.10f X2=%.10f Y2=%.10f W=%.10f L=\"%s\")\n", iu2hyp( track->GetStart().x ), - iu2hyp( track->GetStart().y ), + iu2hyp( -track->GetStart().y ), iu2hyp( track->GetEnd().x ), - iu2hyp( track->GetEnd().y ), + iu2hyp( -track->GetEnd().y ), iu2hyp( track->GetWidth() ), (const char*) layerName.c_str() ); } @@ -488,11 +488,11 @@ bool HYPERLYNX_EXPORTER::writeNetObjects( const std::vector& aObjec m_out->Print( 1, "(ARC X1=%.10f Y1=%.10f X2=%.10f Y2=%.10f XC=%.10f YC=%.10f R=%.10f W=%.10f L=\"%s\")\n", iu2hyp( start.x ), - iu2hyp( start.y ), + iu2hyp( -start.y ), iu2hyp( end.x ), - iu2hyp( end.y ), + iu2hyp( -end.y ), iu2hyp( arc->GetCenter().x ), - iu2hyp( arc->GetCenter().y ), + iu2hyp( -arc->GetCenter().y ), iu2hyp( arc->GetRadius() ), iu2hyp( arc->GetWidth() ), (const char*) layerName.c_str() ); @@ -515,16 +515,16 @@ bool HYPERLYNX_EXPORTER::writeNetObjects( const std::vector& aObjec (const char*) layerName.c_str(), m_polyId, iu2hyp( p0.x ), - iu2hyp( p0.y ) ); + iu2hyp( -p0.y ) ); for( int v = 0; v < outl.PointCount(); v++ ) { m_out->Print( 2, "(LINE X=%.10f Y=%.10f)\n", iu2hyp( outl.CPoint( v ).x ), - iu2hyp( outl.CPoint( v ).y ) ); + iu2hyp( -outl.CPoint( v ).y ) ); } - m_out->Print( 2, "(LINE X=%.10f Y=%.10f)\n", iu2hyp( p0.x ), iu2hyp( p0.y ) ); + m_out->Print( 2, "(LINE X=%.10f Y=%.10f)\n", iu2hyp( p0.x ), iu2hyp( -p0.y ) ); m_out->Print( 1, "}\n" ); for( int h = 0; h < fill.HoleCount( i ); h++ ) @@ -535,18 +535,18 @@ bool HYPERLYNX_EXPORTER::writeNetObjects( const std::vector& aObjec m_out->Print( 1, "{POLYVOID ID=%d X=%.10f Y=%.10f\n", m_polyId, iu2hyp( ph0.x ), - iu2hyp( ph0.y ) ); + iu2hyp( -ph0.y ) ); for( int v = 0; v < holeShape.PointCount(); v++ ) { m_out->Print( 2, "(LINE X=%.10f Y=%.10f)\n", iu2hyp( holeShape.CPoint( v ).x ), - iu2hyp( holeShape.CPoint( v ).y ) ); + iu2hyp( -holeShape.CPoint( v ).y ) ); } m_out->Print( 2, "(LINE X=%.10f Y=%.10f)\n", iu2hyp( ph0.x ), - iu2hyp( ph0.y ) ); + iu2hyp( -ph0.y ) ); m_out->Print( 1, "}\n" ); } diff --git a/pcbnew/pcbexpr_evaluator.cpp b/pcbnew/pcbexpr_evaluator.cpp index 6d451b67ca..686e75e14b 100644 --- a/pcbnew/pcbexpr_evaluator.cpp +++ b/pcbnew/pcbexpr_evaluator.cpp @@ -155,18 +155,14 @@ public: const wxString& AsString() const override { - const_cast( this )->Set( - m_item->GetEffectiveNetClass()->GetName() ); + const_cast( this )->Set( m_item->GetEffectiveNetClass()->GetName() ); return LIBEVAL::VALUE::AsString(); } bool EqualTo( LIBEVAL::CONTEXT* aCtx, const VALUE* b ) const override { if( const PCBEXPR_NETCLASS_VALUE* bValue = dynamic_cast( b ) ) - { - return *( m_item->GetEffectiveNetClass() ) - == *( bValue->m_item->GetEffectiveNetClass() ); - } + return *( m_item->GetEffectiveNetClass() ) == *( bValue->m_item->GetEffectiveNetClass() ); if( b->GetType() == LIBEVAL::VT_STRING ) { @@ -195,10 +191,7 @@ public: bool NotEqualTo( LIBEVAL::CONTEXT* aCtx, const LIBEVAL::VALUE* b ) const override { if( const PCBEXPR_NETCLASS_VALUE* bValue = dynamic_cast( b ) ) - { - return *( m_item->GetEffectiveNetClass() ) - != *( bValue->m_item->GetEffectiveNetClass() ); - } + return *( m_item->GetEffectiveNetClass() ) != *( bValue->m_item->GetEffectiveNetClass() ); if( b->GetType() == LIBEVAL::VT_STRING ) { @@ -245,7 +238,8 @@ class PCBEXPR_COMPONENT_CLASS_VALUE : public LIBEVAL::VALUE { public: PCBEXPR_COMPONENT_CLASS_VALUE( BOARD_ITEM* aItem ) : - LIBEVAL::VALUE( wxEmptyString ), m_item( dynamic_cast( aItem ) ) + LIBEVAL::VALUE( wxEmptyString ), + m_item( dynamic_cast( aItem ) ) {}; const wxString& AsString() const override @@ -261,8 +255,7 @@ public: bool EqualTo( LIBEVAL::CONTEXT* aCtx, const VALUE* b ) const override { - if( const PCBEXPR_COMPONENT_CLASS_VALUE* bValue = - dynamic_cast( b ) ) + if( const PCBEXPR_COMPONENT_CLASS_VALUE* bValue = dynamic_cast( b ) ) { if( !m_item || !bValue->m_item ) return LIBEVAL::VALUE::EqualTo( aCtx, b ); @@ -299,8 +292,7 @@ public: bool NotEqualTo( LIBEVAL::CONTEXT* aCtx, const LIBEVAL::VALUE* b ) const override { - if( const PCBEXPR_COMPONENT_CLASS_VALUE* bValue = - dynamic_cast( b ) ) + if( const PCBEXPR_COMPONENT_CLASS_VALUE* bValue = dynamic_cast( b ) ) { if( !m_item || !bValue->m_item ) return LIBEVAL::VALUE::NotEqualTo( aCtx, b ); @@ -535,7 +527,7 @@ LIBEVAL::FUNC_CALL_REF PCBEXPR_UCODE::CreateFuncCall( const wxString& aName ) std::unique_ptr PCBEXPR_UCODE::CreateVarRef( const wxString& aVar, - const wxString& aField ) + const wxString& aField ) { PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance(); std::unique_ptr vref;