Compare commits

..

14 Commits

Author SHA1 Message Date
Wayne Stambaugh b23b48b9a7 Tag version 5.0.1-dev. 2018-07-13 16:33:17 -04:00
Wayne Stambaugh 84427f463c Tag release 5.0.0. 2018-07-13 15:53:52 -04:00
Wayne Stambaugh bded0cfc19 KiCad: make initial minimum main frame width show all icons.
Fixes lp:1780300

https://bugs.launchpad.net/kicad/+bug/1780300
2018-07-13 15:53:03 -04:00
Wayne Stambaugh eaf938c7e9 Pcbnew: fix missing undo when deleting footprint text object.
Fixes lp:1781224

https://bugs.launchpad.net/kicad/+bug/1781224
2018-07-12 09:36:13 -04:00
Carsten Schoenert 3e22e5ccd3 fix misspelled 'an other' -> 'another' 2018-07-11 10:35:35 -04:00
Carsten Schoenert e81faa2d5f fix misspelled 'allow to' -> 'allow one to' 2018-07-11 10:35:14 -04:00
Carsten Schoenert 9f7109826d fix misspelled 'allows to' -> 'allows one to'
Fixup small grammar issues around used 'allows to ...' almost in
code comments.
2018-07-11 10:35:03 -04:00
Carsten Schoenert 9a13dd48af fix misspelled 'Toogle' -> 'Toggle'
A small typo fixup for misspelled word Toogle.
2018-07-11 10:34:53 -04:00
Maciej Suminski 14ce518208 Speed-up Spice model library loading
Thanks to Jeff Wheeler for determining the slow down cause.

Fixes: lp:1779566
* https://bugs.launchpad.net/kicad/+bug/1779566
2018-07-10 20:55:37 +02:00
Maciej Suminski 0013e0cad1 DRC: test for items located on disabled layers
Fixes: lp:1779281
* https://bugs.launchpad.net/kicad/+bug/1779281
2018-07-10 18:24:15 +02:00
jean-pierre charras 840a8b1d36 Eeschema, renumbering components: Fix multiparts IC supply renumber problem.
With "reset but keep order of multi-units parts" option on, these units were incorrectly grouped.

Fixes: lp:1780876
https://bugs.launchpad.net/kicad/+bug/1780876
2018-07-10 17:53:06 +02:00
Baranovskiy Konstantin 5e1605af19 Values of argc and argv transfers to python environment. 2018-07-08 08:10:44 +02:00
Seth Hillbrand 101b68b610 pcbnew: Keep dp placer on initial layer
Changing the layer after starting the differential pair placer should
not change the inital track layer.

Fixes: lp:1779800
* https://bugs.launchpad.net/kicad/+bug/1779800
2018-07-03 08:23:16 -07:00
jean-pierre charras 3df27430c7 Fix eeschema crash when updating fields from libraries, and when a symbol in schematic is not found in libs
Fixes: lp:1779722
https://bugs.launchpad.net/kicad/+bug/1779722
2018-07-02 21:02:27 +02:00
34 changed files with 171 additions and 96 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ class EDA_3D_VIEWER : public KIWAY_PLAYER
/**
* Request reloading the 3D view. However the request will be executed
* only when the 3D canvas is refreshed.
* It allows to prepare changes and request for 3D rebuild only when all
* It allows one to prepare changes and request for 3D rebuild only when all
* changes are committed.
* This is made because the 3D rebuild can take a long time, and this rebuild
* cannot always made after each change, for calculation time reason.
+1 -1
View File
@@ -35,4 +35,4 @@
# be set after each version tag is added to the git repo. This will
# give developers a reasonable idea where which branch was used to build
# KiCad.
set( KICAD_VERSION "5.0.0-rc3-unknown" )
set( KICAD_VERSION "5.0.1-dev-unknown" )
+14 -14
View File
@@ -519,7 +519,7 @@ const char smaa_base_shader_p1[] = R"SHADER_SOURCE(
* - DX10.1: D3D10_STANDARD_MULTISAMPLE_PATTERN or
* - DX11: D3D11_STANDARD_MULTISAMPLE_PATTERN
*
* This allows to ensure that the subsample order matches the table in
* This allows one to ensure that the subsample order matches the table in
* @SUBSAMPLE_INDICES.
*
* (*) In the case of DX10, we refer the reader to:
@@ -620,8 +620,8 @@ const char smaa_base_shader_p1[] = R"SHADER_SOURCE(
* performance.
*
* Range: [0, 0.5]
* 0.1 is a reasonable value, and allows to catch most visible edges.
* 0.05 is a rather overkill value, that allows to catch 'em all.
* 0.1 is a reasonable value, and allows one to catch most visible edges.
* 0.05 is a rather overkill value, that allows one to catch 'em all.
*
* If temporal supersampling is used, 0.2 could be a reasonable value, as low
* contrast edges are properly filtered by just 2x.
@@ -686,7 +686,7 @@ const char smaa_base_shader_p2[] = R"SHADER_SOURCE(
* If there is an neighbor edge that has SMAA_LOCAL_CONTRAST_FACTOR times
* bigger contrast than current edge, current edge will be discarded.
*
* This allows to eliminate spurious crossing edges, and is based on the fact
* This allows one to eliminate spurious crossing edges, and is based on the fact
* that, if there is too much contrast in a direction, that will hide
* perceptually contrast in the other neighbors.
*/
@@ -695,7 +695,7 @@ const char smaa_base_shader_p2[] = R"SHADER_SOURCE(
#endif
/**
* Predicated thresholding allows to better preserve texture details and to
* Predicated thresholding allows one to better preserve texture details and to
* improve performance, by decreasing the number of detected edges using an
* additional buffer like the light accumulation buffer, object ids or even the
* depth buffer (the depth buffer usage may be limited to indoor or short range
@@ -742,7 +742,7 @@ const char smaa_base_shader_p2[] = R"SHADER_SOURCE(
#endif
/**
* Temporal reprojection allows to remove ghosting artifacts when using
* Temporal reprojection allows one to remove ghosting artifacts when using
* temporal supersampling. We use the CryEngine 3 method which also introduces
* velocity weighting. This feature is of extreme importance for totally
* removing ghosting. More information here:
@@ -757,8 +757,8 @@ const char smaa_base_shader_p2[] = R"SHADER_SOURCE(
#endif
/**
* SMAA_REPROJECTION_WEIGHT_SCALE controls the velocity weighting. It allows to
* remove ghosting trails behind the moving object, which are not removed by
* SMAA_REPROJECTION_WEIGHT_SCALE controls the velocity weighting. It allows one
* to remove ghosting trails behind the moving object, which are not removed by
* just using reprojection. Using low values will exhibit ghosting, while using
* high values will disable temporal supersampling under motion.
*
@@ -1158,7 +1158,7 @@ float4 SMAADecodeDiagBilinearAccess(float4 e) {
}
/**
* These functions allows to perform diagonal pattern searches.
* These functions allows one to perform diagonal pattern searches.
*/
float2 SMAASearchDiag1(SMAATexture2D(edgesTex), float2 texcoord, float2 dir, out float2 e) {
float4 coord = float4(texcoord, -1.0, 1.0);
@@ -1290,7 +1290,7 @@ float2 SMAACalculateDiagWeights(SMAATexture2D(edgesTex), SMAATexture2D(areaTex),
// Horizontal/Vertical Search Functions
/**
* This allows to determine how much length should we add in the last step
* This allows one to determine how much length should we add in the last step
* of the searches. It takes the bilinearly interpolated edge (see
* @PSEUDO_GATHER4), and adds 0, 1 or 2, depending on which edges and
* crossing edges are active.
@@ -1322,8 +1322,8 @@ float SMAASearchXLeft(SMAATexture2D(edgesTex), SMAATexture2D(searchTex), float2
* @PSEUDO_GATHER4
* This texcoord has been offset by (-0.25, -0.125) in the vertex shader to
* sample between edge, thus fetching four edges in a row.
* Sampling with different offsets in each direction allows to disambiguate
* which edges are active from the four fetched ones.
* Sampling with different offsets in each direction allows one to
* disambiguate which edges are active from the four fetched ones.
*/
float2 e = float2(0.0, 1.0);
while (texcoord.x > end &&
@@ -1484,8 +1484,8 @@ float4 SMAABlendingWeightCalculationPS(float2 texcoord,
coords.z = SMAASearchXRight(SMAATexturePass2D(edgesTex), SMAATexturePass2D(searchTex), offset[0].zw, offset[2].y);
d.y = coords.z;
// We want the distances to be in pixel units (doing this here allow to
// better interleave arithmetic and memory accesses):
// We want the distances to be in pixel units (doing this here allow one
// to better interleave arithmetic and memory accesses):
d = abs(round(mad(SMAA_RT_METRICS.zz, d, -pixcoord.xx)));
// SMAAArea below needs a sqrt, as the areas texture is compressed
+1 -1
View File
@@ -37,7 +37,7 @@
static TOOL_ACTION ACT_toggleCursor( "common.Control.toggleCursor",
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_TOGGLE_CURSOR ),
_( "Toggle Always Show Cursor" ),
_( "Toogle display of the cursor, even when not in an interactive tool" ) );
_( "Toggle display of the cursor, even when not in an interactive tool" ) );
COMMON_TOOLS::COMMON_TOOLS() :
+10 -4
View File
@@ -273,11 +273,15 @@ int SCH_REFERENCE_LIST::CreateFirstFreeRefId( std::vector<int>& aIdList, int aFi
// A helper function to build a full reference string of a SCH_REFERENCE item
wxString buildFullReference( const SCH_REFERENCE& aItem )
wxString buildFullReference( const SCH_REFERENCE& aItem, int aUnitNumber = -1 )
{
wxString fullref;
fullref = aItem.GetRef() + aItem.GetRefNumber();
fullref << ".." << aItem.GetUnit();
if( aUnitNumber < 0 )
fullref << ".." << aItem.GetUnit();
else
fullref << ".." << aUnitNumber;
return fullref;
}
@@ -344,6 +348,7 @@ void SCH_REFERENCE_LIST::Annotate( bool aUseSheetNum, int aSheetIntervalId, int
for( SCH_MULTI_UNIT_REFERENCE_MAP::value_type& pair : aLockedUnitMap )
{
unsigned n_refs = pair.second.GetCount();
for( unsigned thisRefI = 0; thisRefI < n_refs; ++thisRefI )
{
SCH_REFERENCE &thisRef = pair.second[thisRefI];
@@ -433,6 +438,8 @@ void SCH_REFERENCE_LIST::Annotate( bool aUseSheetNum, int aSheetIntervalId, int
{
// This is the component we're currently annotating. Hold the unit!
componentFlatList[ii].m_Unit = thisRef.m_Unit;
// lock this new full reference
inUseRefs.insert( buildFullReference( componentFlatList[ii] ) );
}
if( thisRef.CompareValue( componentFlatList[ii] ) != 0 )
@@ -447,7 +454,7 @@ void SCH_REFERENCE_LIST::Annotate( bool aUseSheetNum, int aSheetIntervalId, int
if( ! thisRef.IsSameInstance( componentFlatList[jj] ) )
continue;
wxString ref_candidate = buildFullReference( componentFlatList[ii] );
wxString ref_candidate = buildFullReference( componentFlatList[ii], thisRef.m_Unit );
// propagate the new reference and unit selection to the "old" component,
// if this new full reference is not already used (can happens when initial
@@ -465,7 +472,6 @@ void SCH_REFERENCE_LIST::Annotate( bool aUseSheetNum, int aSheetIntervalId, int
}
}
}
else
{
/* search for others units of this component.
+14 -3
View File
@@ -31,6 +31,7 @@
#include <project.h>
#include <wx/tokenzr.h>
#include <wx/wupdlock.h>
// Helper function to shorten conditions
static bool empty( const wxTextCtrl* aCtrl )
@@ -604,12 +605,20 @@ void DIALOG_SPICE_MODEL::loadLibrary( const wxString& aFilePath )
}
// Display the library contents
m_libraryContents->LoadFile( filePath.GetFullPath() );
wxWindowUpdateLocker updateLock( this );
m_libraryContents->Clear();
wxTextFile file;
file.Open( filePath.GetFullPath() );
int line_nr = 0;
// Process the file, looking for components
for( int line_nr = 0; line_nr < m_libraryContents->GetNumberOfLines(); ++line_nr )
while( !file.Eof() )
{
wxStringTokenizer tokenizer( m_libraryContents->GetLineText( line_nr ) );
const wxString& line = line_nr == 0 ? file.GetFirstLine() : file.GetNextLine();
m_libraryContents->AppendText( line );
m_libraryContents->AppendText( "\n" );
wxStringTokenizer tokenizer( line );
while( tokenizer.HasMoreTokens() )
{
@@ -650,6 +659,8 @@ void DIALOG_SPICE_MODEL::loadLibrary( const wxString& aFilePath )
in_subckt = false;
}
}
++line_nr;
}
wxArrayString models;
@@ -135,6 +135,10 @@ void DIALOG_UPDATE_FIELDS::updateFields( SCH_COMPONENT* aComponent )
SCH_FIELDS newFields;
PART_SPTR libPart = aComponent->GetPartRef().lock();
if( libPart == nullptr ) // the symbol is not found in lib: cannot update fields
return;
aComponent->GetFields( oldFields, false );
for( auto compField : oldFields )
+3 -3
View File
@@ -898,9 +898,9 @@ private:
void OnRescueProject( wxCommandEvent& event );
void OnRemapSymbols( wxCommandEvent& aEvent );
// a helper function to run the dialog that allows to rename the symbol library Id of
// groups of components, for instance after a symbol has moved from a library to
// another library
// a helper function to run the dialog that allows one to rename the symbol
// library Id of groups of components, for instance after a symbol has moved
// from a library to another library
void OnEditComponentSymbolsId( wxCommandEvent& aEvent );
void OnPreferencesOptions( wxCommandEvent& event );
void OnCancelCurrentCommand( wxCommandEvent& aEvent );
+1 -1
View File
@@ -71,7 +71,7 @@
* corresponding references and sheet path
*
* The class SCH_SHEET_PATH handles paths used to access a sheet. The class
* SCH_SHEET_LIST allows to handle the full (or partial) list of sheets and
* SCH_SHEET_LIST allows one to handle the full (or partial) list of sheets and
* their paths in a complex hierarchy. The class EDA_ScreenList allows one
* to handle the list of SCH_SCREEN. It is useful to clear or save data,
* but is not suitable to handle the full complex hierarchy possibilities
+1 -1
View File
@@ -32,7 +32,7 @@
#include "sim_types.h"
/// Special netlist exporter flavor that allows to override simulation commands
/// Special netlist exporter flavor that allows one to override simulation commands
class NETLIST_EXPORTER_PSPICE_SIM : public NETLIST_EXPORTER_PSPICE
{
public:
+7 -5
View File
@@ -124,8 +124,9 @@ public:
private:
/**
* Function selectPoint()
* Selects an item pointed by the parameter aWhere. If there is more than one item at that
* place, there is a menu displayed that allows to choose the item.
* Selects an item pointed by the parameter aWhere. If there is more than
* one item at that place, there is a menu displayed that allows one to
* choose the item.
*
* @param aWhere is the place where the item should be selected.
* @param aAllowDisambiguation decides what to do in case of disambiguation. If true, then
@@ -145,7 +146,8 @@ private:
/**
* Function selectMultiple()
* Handles drawing a selection box that allows to select many items at the same time.
* Handles drawing a selection box that allows one to select many items at
* the same time.
*
* @return true if the function was cancelled (i.e. CancelEvent was received).
*/
@@ -159,8 +161,8 @@ private:
/**
* Function disambiguationMenu()
* Handles the menu that allows to select one of many items in case there is more than one
* item at the selected point (@see selectCursor()).
* Handles the menu that allows one to select one of many items in case
* there is more than one item at the selected point (@see selectCursor()).
*
* @param aItems contains list of items that are displayed to the user.
*/
+1 -1
View File
@@ -38,7 +38,7 @@ class PLOTTER;
* class BASIC_GAL is a minimal GAL implementation to draw, plot and convert
* stroke texts to a set of segments for DRC tests, and to calculate text sizes.
*
* Currently it allows to use GAL and STROKE_FONT methods in legacy draw mode
* Currently it allows one to use GAL and STROKE_FONT methods in legacy draw mode
* (using wxDC functions) in plot functions only for texts.
* It is used also to calculate the text bounding boxes
*
+6 -6
View File
@@ -435,7 +435,7 @@ public:
}
/**
* calling this function allows to define the beginning of a group
* calling this function allows one to define the beginning of a group
* of drawing items, for instance in SVG or Gerber format.
* (example: group all segments of a letter or a text)
* @param aData can define any parameter
@@ -444,8 +444,8 @@ public:
virtual void StartBlock( void* aData ) {}
/**
* calling this function allows to define the end of a group of drawing items
* for instance in SVG or Gerber format.
* calling this function allows one to define the end of a group of drawing
* items for instance in SVG or Gerber format.
* the group is started by StartBlock()
* @param aData can define any parameter
* for most of plotters: do nothing
@@ -1137,15 +1137,15 @@ public:
void UseX2NetAttributes( bool aEnable ) { m_useNetAttributes = aEnable; }
/**
* calling this function allows to define the beginning of a group
* calling this function allows one to define the beginning of a group
* of drawing items (used in X2 format with netlist attributes)
* @param aData can define any parameter
*/
virtual void StartBlock( void* aData ) override;
/**
* calling this function allows to define the end of a group of drawing items
* the group is started by StartBlock()
* calling this function allows one to define the end of a group of drawing
* items the group is started by StartBlock()
* (used in X2 format with netlist attributes)
* @param aData can define any parameter
*/
+2 -2
View File
@@ -36,8 +36,8 @@ class TOOL_ACTION;
/**
* Class ACTION_MANAGER
*
* Takes care of TOOL_ACTION objects. Registers them and allows to run them using associated
* hot keys, names or ids.
* Takes care of TOOL_ACTION objects. Registers them and allows one to run them
* using associated hot keys, names or ids.
*/
class ACTION_MANAGER
{
+2 -2
View File
@@ -96,8 +96,8 @@ public:
* Adds a context menu as a submenu. The difference between this function and wxMenu::AppendSubMenu()
* is the capability to handle icons.
* @param aMenu is the submenu to be added.
* @param aExpand allows to add all entries from the menu as individual entries rather than
* add everything as a submenu.
* @param aExpand allows one to add all entries from the menu as individual
* entries rather than add everything as a submenu.
*/
std::list<wxMenuItem*> Add( CONTEXT_MENU* aMenu, bool aExpand = false );
+1 -1
View File
@@ -100,7 +100,7 @@ enum TOOL_ACTIONS
// This event is sent *after* undo/redo command is performed.
TA_UNDO_REDO_POST = 0x40000,
// Tool action (allows to control tools).
// Tool action (allows one to control tools).
TA_ACTION = 0x80000,
// Tool activation event.
+6 -6
View File
@@ -720,8 +720,8 @@ private:
*
* @param aItem is the item to be drawn.
* @param aLayer is the layer which should be drawn.
* @param aImmediate dictates the way of drawing - it allows to force immediate drawing mode
* for cached items.
* @param aImmediate dictates the way of drawing - it allows one to force
* immediate drawing mode for cached items.
*/
void draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate = false );
@@ -730,8 +730,8 @@ private:
* Draws an item on all layers that the item uses.
*
* @param aItem is the item to be drawn.
* @param aImmediate dictates the way of drawing - it allows to force immediate drawing mode
* for cached items.
* @param aImmediate dictates the way of drawing - it allows one to force
* immediate drawing mode for cached items.
*/
void draw( VIEW_ITEM* aItem, bool aImmediate = false );
@@ -740,8 +740,8 @@ private:
* Draws a group of items on all layers that those items use.
*
* @param aGroup is the group to be drawn.
* @param aImmediate dictates the way of drawing - it allows to force immediate drawing mode
* for cached items.
* @param aImmediate dictates the way of drawing - it allows one to force
* immediate drawing mode for cached items.
*/
void draw( VIEW_GROUP* aGroup, bool aImmediate = false );
+1 -1
View File
@@ -131,7 +131,7 @@ bool PGM_KICAD::OnPgmInit()
ReadHotkeyConfig( KICAD_MANAGER_FRAME_NAME, kicad_Manager_Hokeys_Descr );
KICAD_MANAGER_FRAME* frame = new KICAD_MANAGER_FRAME( NULL, wxT( "KiCad" ),
wxDefaultPosition, wxDefaultSize );
wxDefaultPosition, wxSize( 775, -1 ) );
App().SetTopWindow( frame );
Kiway.SetTop( frame );
+2 -2
View File
@@ -206,7 +206,7 @@ public:
* Function GetConnectedItems()
* Returns a list of items connected to a source item aItem.
* @param aItem is the reference item to find other connected items.
* @param aTypes allows to filter by item types.
* @param aTypes allows one to filter by item types.
*/
const std::vector<BOARD_CONNECTED_ITEM*> GetConnectedItems( const BOARD_CONNECTED_ITEM* aItem,
const KICAD_T aTypes[] ) const;
@@ -215,7 +215,7 @@ public:
* Function GetNetItems()
* Returns the list of items that belong to a certain net.
* @param aNetCode is the net code.
* @param aTypes allows to filter by item types.
* @param aTypes allows one to filter by item types.
*/
const std::vector<BOARD_CONNECTED_ITEM*> GetNetItems( int aNetCode,
const KICAD_T aTypes[] ) const;
+1 -1
View File
@@ -968,7 +968,7 @@
<property name="style"></property>
<property name="subclass"></property>
<property name="toolbar_pane">0</property>
<property name="tooltip">(Highlight collisions mode only) - allows to establish a track even if is violating the DRC rules.</property>
<property name="tooltip">(Highlight collisions mode only) - allows one to establish a track even if is violating the DRC rules.</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
+47
View File
@@ -514,6 +514,15 @@ void DRC::RunTests( wxTextCtrl* aMessages )
doFootprintOverlappingDrc();
}
// Check if there are items on disabled layers
testDisabledLayers();
if( aMessages )
{
aMessages->AppendText( _( "Items on disabled layers...\n" ) );
aMessages->Refresh();
}
// update the m_drcDialog listboxes
updatePointers();
@@ -1014,6 +1023,44 @@ void DRC::testTexts()
}
void DRC::testDisabledLayers()
{
BOARD* board = m_pcbEditorFrame->GetBoard();
wxCHECK( board, /*void*/ );
LSET disabledLayers = board->GetEnabledLayers().flip();
auto createMarker = [&]( BOARD_ITEM* aItem )
{
wxString msg;
msg.Printf( _( "\"%s\" is on a disabled layer" ), aItem->GetSelectMenuText() );
m_currentMarker = fillMarker( aItem->GetPosition(), DRCE_DISABLED_LAYER_ITEM,
msg, m_currentMarker );
addMarkerToPcb( m_currentMarker );
m_currentMarker = nullptr;
};
for( auto track : board->Tracks() )
{
if( disabledLayers.test( track->GetLayer() ) )
createMarker( track );
}
for( auto module : board->Modules() )
{
module->RunOnChildren( [&]( BOARD_ITEM* aItem ) {
if( disabledLayers.test( aItem->GetLayer() ) )
createMarker( aItem );
} );
}
for( auto zone : board->Zones() )
{
if( disabledLayers.test( zone->GetLayer() ) )
createMarker( zone );
}
}
bool DRC::doTrackKeepoutDrc( TRACK* aRefSeg )
{
// Test keepout areas for vias, tracks and pads inside keepout areas
+4
View File
@@ -90,6 +90,7 @@
///< (not convertible to a closed polygon with holes)
#define DRCE_MICRO_VIA_NOT_ALLOWED 47 ///< micro vias are not allowed
#define DRCE_BURIED_VIA_NOT_ALLOWED 48 ///< buried vias are not allowed
#define DRCE_DISABLED_LAYER_ITEM 49 ///< item on a disabled layer
class EDA_DRAW_PANEL;
@@ -310,6 +311,9 @@ private:
void testTexts();
///> Tests for items placed on disabled layers (causing false connections).
void testDisabledLayers();
//-----<single "item" tests>-----------------------------------------
bool doNetClass( const std::shared_ptr<NETCLASS>& aNetClass, wxString& msg );
+2
View File
@@ -75,6 +75,8 @@ wxString DRC_ITEM::GetErrorText() const
return wxString( _( "Micro Via: not allowed" ) );
case DRCE_BURIED_VIA_NOT_ALLOWED:
return wxString( _( "Buried Via: not allowed" ) );
case DRCE_DISABLED_LAYER_ITEM:
return wxString( _( "Item on a disabled layer" ) );
case COPPERAREA_INSIDE_COPPERAREA:
return wxString( _( "Copper area inside copper area" ) );
case COPPERAREA_CLOSE_TO_COPPERAREA:
+1 -1
View File
@@ -270,7 +270,7 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC,
// is fully inside a pad, MarkTrace does not find correctly the full trace,
// because the entire track is the set of segments between 2 nodes
// (pads or point connecting more than 2 items)
// so use an other (better) starting segment in this case
// so use another (better) starting segment in this case
TRACK* track_segment = aNewTrack;
for( int ii = 0; ii < aNewTrackSegmentsCount; ii++ )
+16 -20
View File
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-2018 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -70,7 +70,8 @@ TEXTE_MODULE* FOOTPRINT_EDIT_FRAME::CreateTextModule( MODULE* aModule, wxDC* aDC
text->SetFlags( IS_NEW );
GetDesignSettings().m_ModuleTextWidth = Clamp_Text_PenSize( GetDesignSettings().m_ModuleTextWidth,
std::min( GetDesignSettings().m_ModuleTextSize.x, GetDesignSettings().m_ModuleTextSize.y ), true );
std::min( GetDesignSettings().m_ModuleTextSize.x,
GetDesignSettings().m_ModuleTextSize.y ), true );
text->SetTextSize( GetDesignSettings().m_ModuleTextSize );
text->SetThickness( GetDesignSettings().m_ModuleTextWidth );
text->SetPosition( GetCrossHairPosition() );
@@ -103,8 +104,6 @@ TEXTE_MODULE* FOOTPRINT_EDIT_FRAME::CreateTextModule( MODULE* aModule, wxDC* aDC
}
/* Rotate text 90 degrees.
*/
void PCB_BASE_FRAME::RotateTextModule( TEXTE_MODULE* Text, wxDC* DC )
{
if( Text == NULL )
@@ -133,29 +132,29 @@ void PCB_BASE_FRAME::RotateTextModule( TEXTE_MODULE* Text, wxDC* DC )
}
/*
* Deletes text in module (if not the reference or value)
*/
void PCB_BASE_FRAME::DeleteTextModule( TEXTE_MODULE* Text )
void PCB_BASE_FRAME::DeleteTextModule( TEXTE_MODULE* aText )
{
MODULE* Module;
MODULE* module;
if( Text == NULL )
if( aText == NULL )
return;
Module = static_cast<MODULE*>( Text->GetParent() );
module = static_cast<MODULE*>( aText->GetParent() );
if( Text->GetType() == TEXTE_MODULE::TEXT_is_DIVERS )
if( aText->GetType() == TEXTE_MODULE::TEXT_is_DIVERS )
{
m_canvas->RefreshDrawingRect( Text->GetBoundingBox() );
Text->DeleteStructure();
if( module && module->GetFlags() == 0 && aText->GetFlags() == 0 && IsType( FRAME_PCB ) )
SaveCopyInUndoList( module, UR_CHANGED );
m_canvas->RefreshDrawingRect( aText->GetBoundingBox() );
aText->DeleteStructure();
OnModify();
Module->SetLastEditTime();
module->SetLastEditTime();
}
}
/*
/**
* Abort text move in progress.
*
* If a text is selected, its initial coordinates are regenerated.
@@ -194,8 +193,6 @@ static void AbortMoveTextModule( EDA_DRAW_PANEL* Panel, wxDC* DC )
}
/* Start a text move.
*/
void PCB_BASE_FRAME::StartMoveTexteModule( TEXTE_MODULE* Text, wxDC* DC )
{
if( Text == NULL )
@@ -222,8 +219,6 @@ void PCB_BASE_FRAME::StartMoveTexteModule( TEXTE_MODULE* Text, wxDC* DC )
}
/* Place the text a the cursor position when the left mouse button is clicked.
*/
void PCB_BASE_FRAME::PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC )
{
if( Text != NULL )
@@ -299,6 +294,7 @@ static void Show_MoveTexte_Module( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo
Text->Draw( aPanel, aDC, GR_XOR, MoveVector );
}
void PCB_BASE_FRAME::ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC )
{
wxSize newSize;
+1 -1
View File
@@ -556,7 +556,7 @@ void prepareEditMenu( wxMenu* aParentMenu, bool aUseGal )
AddMenuItem( aParentMenu, ID_MENU_PCB_SWAP_LAYERS,
_( "&Move and Swap Layers..." ),
_( "Move tracks or drawings from a layer to an other layer" ),
_( "Move tracks or drawings from a layer to another layer" ),
KiBitmap( swap_layer_xpm ) );
aParentMenu->AppendSeparator();
+1 -1
View File
@@ -294,7 +294,7 @@ public:
/**
* Function Translate
* Translates net number according to the map prepared by Update() function. It
* allows to have items stored with consecutive net codes.
* allows one to have items stored with consecutive net codes.
* @param aNetCode is an old net code.
* @return Net code that follows the mapping.
*/
+2 -2
View File
@@ -145,7 +145,7 @@ bool PCB_BASE_FRAME::Update3DView( const wxString* aTitle )
if( draw3DFrame == NULL )
return false;
// Ensure the viewer was created by me, and not by an other editor:
// Ensure the viewer was created by me, and not by another editor:
PCB_BASE_FRAME* owner = draw3DFrame->Parent();
// if I am not the owner, do not use the current viewer instance
@@ -434,7 +434,7 @@ bool PCB_BASE_FRAME::CreateAndShow3D_Frame( bool aForceRecreateIfNotOwner )
{
EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame();
// Ensure the viewer was created by me, and not by an other editor:
// Ensure the viewer was created by me, and not by another editor:
PCB_BASE_FRAME* owner = draw3DFrame ? draw3DFrame->Parent() : nullptr;
// if I am not the owner, do not use the current viewer instance
+5 -4
View File
@@ -384,11 +384,12 @@ bool DIFF_PAIR_PLACER::SetLayer( int aLayer )
{
m_currentLayer = aLayer;
return true;
} else if( m_chainedPlacement )
}
else if( m_chainedPlacement || !m_prevPair )
{
return false;
else if( !m_prevPair )
return false;
else if( m_prevPair->PrimP() || ( m_prevPair->PrimP()->OfKind( ITEM::VIA_T ) &&
}
else if( !m_prevPair->PrimP() || ( m_prevPair->PrimP()->OfKind( ITEM::VIA_T ) &&
m_prevPair->PrimP()->Layers().Overlaps( aLayer ) ) )
{
m_currentLayer = aLayer;
+1
View File
@@ -145,6 +145,7 @@ bool pcbnewInitPythonScripting( const char * aUserScriptingPath )
swigSwitchPythonBuiltin(); // switch the python builtin modules to our new list
Py_Initialize();
PySys_SetArgv(Pgm().App().argc, Pgm().App().argv);
#ifdef KICAD_SCRIPTING_WXPYTHON
PyEval_InitThreads();
+2 -2
View File
@@ -114,8 +114,8 @@ public:
/**
* Function PlaceText()
* Displays a dialog that allows to input text and its settings and then lets the user decide
* where to place the text in editor.
* Displays a dialog that allows one to input text and its settings and then
* lets the user decide where to place the text in editor.
*/
int PlaceText( const TOOL_EVENT& aEvent );
+3 -3
View File
@@ -182,9 +182,9 @@ private:
/**
* Class EDIT_LINE
*
* Represents a line connecting two EDIT_POINTs. That allows to move them both by dragging the
* EDIT_POINT in the middle. As it uses references to EDIT_POINTs, all coordinates are
* automatically synchronized.
* Represents a line connecting two EDIT_POINTs. That allows one to move them
* both by dragging the EDIT_POINT in the middle. As it uses references to
* EDIT_POINTs, all coordinates are automatically synchronized.
*/
class EDIT_LINE : public EDIT_POINT
{
+2 -2
View File
@@ -863,8 +863,8 @@ bool POINT_EDITOR::removeCornerCondition( const SELECTION& )
// Check if there are enough vertices so one can be removed without
// degenerating the polygon.
// The first condition allows to remove all corners from holes (when there
// are only 2 vertices left, a hole is removed).
// The first condition allows one to remove all corners from holes (when
// there are only 2 vertices left, a hole is removed).
if( vertexIdx.m_contour == 0 && polyset.Polygon( vertexIdx.m_polygon )[vertexIdx.m_contour].PointCount() <= 3 )
return false;
+5 -4
View File
@@ -146,7 +146,7 @@ private:
/**
* Function selectPoint()
* Selects an item pointed by the parameter aWhere. If there is more than one item at that
* place, there is a menu displayed that allows to choose the item.
* place, there is a menu displayed that allows one to choose the item.
*
* @param aWhere is the place where the item should be selected.
* @param aOnDrag indicates whether a drag operation is being performed.
@@ -172,7 +172,8 @@ private:
/**
* Function selectMultiple()
* Handles drawing a selection box that allows to select many items at the same time.
* Handles drawing a selection box that allows one to select many items at
* the same time.
*
* @return true if the function was cancelled (i.e. CancelEvent was received).
*/
@@ -242,8 +243,8 @@ private:
/**
* Function disambiguationMenu()
* Handles the menu that allows to select one of many items in case there is more than one
* item at the selected point (@see selectCursor()).
* Handles the menu that allows one to select one of many items in case
* there is more than one item at the selected point (@see selectCursor()).
*
* @param aItems contains list of items that are displayed to the user.
*/