Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
db49e2a5
Commit
db49e2a5
authored
Oct 27, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some minor bug fixes and enhancements
parent
6a5d55bf
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
46 deletions
+59
-46
class_sch_component.cpp
eeschema/class_sch_component.cpp
+2
-1
find.cpp
eeschema/find.cpp
+1
-0
getpart.cpp
eeschema/getpart.cpp
+4
-2
class_track.cpp
pcbnew/class_track.cpp
+52
-43
No files found.
eeschema/class_sch_component.cpp
View file @
db49e2a5
...
@@ -110,9 +110,10 @@ SCH_COMPONENT::SCH_COMPONENT( LIB_COMPONENT& libComponent, DrawSheetPath* sheet,
...
@@ -110,9 +110,10 @@ SCH_COMPONENT::SCH_COMPONENT( LIB_COMPONENT& libComponent, DrawSheetPath* sheet,
if
(
msg
.
IsEmpty
()
)
if
(
msg
.
IsEmpty
()
)
msg
=
wxT
(
"U"
);
msg
=
wxT
(
"U"
);
m
sg
+=
wxT
(
"?"
)
;
m
_PrefixString
=
msg
;
// update the reference -- just the prefix for now.
// update the reference -- just the prefix for now.
msg
+=
wxT
(
"?"
);
SetRef
(
sheet
,
msg
);
SetRef
(
sheet
,
msg
);
/* Use the schematic component name instead of the library value field
/* Use the schematic component name instead of the library value field
...
...
eeschema/find.cpp
View file @
db49e2a5
...
@@ -656,6 +656,7 @@ void WinEDA_FindFrame::LocatePartInLibs( wxCommandEvent& event )
...
@@ -656,6 +656,7 @@ void WinEDA_FindFrame::LocatePartInLibs( wxCommandEvent& event )
BOOST_FOREACH
(
CMP_LIBRARY
&
lib
,
CMP_LIBRARY
::
GetLibraryList
()
)
BOOST_FOREACH
(
CMP_LIBRARY
&
lib
,
CMP_LIBRARY
::
GetLibraryList
()
)
{
{
nameList
.
Clear
();
lib
.
SearchEntryNames
(
nameList
,
Text
);
lib
.
SearchEntryNames
(
nameList
,
Text
);
if
(
nameList
.
IsEmpty
()
)
if
(
nameList
.
IsEmpty
()
)
...
...
eeschema/getpart.cpp
View file @
db49e2a5
...
@@ -200,10 +200,12 @@ SCH_COMPONENT* WinEDA_SchematicFrame::Load_Component( wxDC* DC,
...
@@ -200,10 +200,12 @@ SCH_COMPONENT* WinEDA_SchematicFrame::Load_Component( wxDC* DC,
Component
=
new
SCH_COMPONENT
(
*
Entry
,
GetSheet
(),
unit
,
convert
,
Component
=
new
SCH_COMPONENT
(
*
Entry
,
GetSheet
(),
unit
,
convert
,
GetScreen
()
->
m_Curseur
,
true
);
GetScreen
()
->
m_Curseur
,
true
);
DrawStructsInGhost
(
DrawPanel
,
DC
,
Component
,
wxPoint
(
0
,
0
)
);
// Set the component value (that can differ from component name in lib, for aliases)
Component
->
GetField
(
VALUE
)
->
m_Text
=
Name
;
Component
->
DisplayInfo
(
this
);
Component
->
DisplayInfo
(
this
);
DrawStructsInGhost
(
DrawPanel
,
DC
,
Component
,
wxPoint
(
0
,
0
)
);
return
Component
;
return
Component
;
}
}
...
...
pcbnew/class_track.cpp
View file @
db49e2a5
...
@@ -558,7 +558,8 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
...
@@ -558,7 +558,8 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
{
{
color
=
g_DesignSettings
.
m_LayerColor
[
m_Layer
];
color
=
g_DesignSettings
.
m_LayerColor
[
m_Layer
];
if
(
g_DesignSettings
.
IsLayerVisible
(
m_Layer
)
==
false
&&
(
color
&
HIGHT_LIGHT_FLAG
)
!=
HIGHT_LIGHT_FLAG
)
if
(
g_DesignSettings
.
IsLayerVisible
(
m_Layer
)
==
false
&&
(
color
&
HIGHT_LIGHT_FLAG
)
!=
HIGHT_LIGHT_FLAG
)
return
;
return
;
if
(
DisplayOpt
.
ContrastModeDisplay
)
if
(
DisplayOpt
.
ContrastModeDisplay
)
...
@@ -723,7 +724,8 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
...
@@ -723,7 +724,8 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
color
=
g_DesignSettings
.
m_ViaColor
[
m_Shape
];
color
=
g_DesignSettings
.
m_ViaColor
[
m_Shape
];
if
(
g_DesignSettings
.
IsElementVisible
(
VIAS_VISIBLE
+
m_Shape
)
==
false
&&
(
color
&
HIGHT_LIGHT_FLAG
)
!=
HIGHT_LIGHT_FLAG
)
if
(
g_DesignSettings
.
IsElementVisible
(
VIAS_VISIBLE
+
m_Shape
)
==
false
&&
(
color
&
HIGHT_LIGHT_FLAG
)
!=
HIGHT_LIGHT_FLAG
)
return
;
return
;
if
(
DisplayOpt
.
ContrastModeDisplay
)
if
(
DisplayOpt
.
ContrastModeDisplay
)
...
@@ -750,30 +752,36 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
...
@@ -750,30 +752,36 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
rayon
=
m_Width
>>
1
;
rayon
=
m_Width
>>
1
;
if
(
panel
->
GetScreen
()
->
Scale
(
rayon
)
<=
4
)
// for small via size on screen (rayon < 4 pixels) draw a simplified shape
int
radius_in_pixels
=
panel
->
GetScreen
()
->
Scale
(
rayon
);
bool
fast_draw
=
false
;
// Vias are drawn as a filled circle or a double circle. The hole will be drawn later
int
drill_rayon
=
GetDrillValue
()
/
2
;
int
inner_rayon
=
rayon
-
panel
->
GetScreen
()
->
Unscale
(
2
);
if
(
radius_in_pixels
<
3
)
{
{
GRCircle
(
&
panel
->
m_ClipBox
,
DC
,
m_Start
.
x
,
m_Start
.
y
,
rayon
,
color
)
;
fast_draw
=
true
;
return
;
fillvia
=
false
;
}
}
if
(
fillvia
)
if
(
fillvia
)
GRFilledCircle
(
&
panel
->
m_ClipBox
,
DC
,
m_Start
.
x
,
m_Start
.
y
,
rayon
,
0
,
color
,
color
);
GRFilledCircle
(
&
panel
->
m_ClipBox
,
DC
,
m_Start
.
x
,
m_Start
.
y
,
rayon
,
0
,
color
,
color
);
else
else
{
GRCircle
(
&
panel
->
m_ClipBox
,
DC
,
m_Start
.
x
,
m_Start
.
y
,
rayon
,
color
);
GRCircle
(
&
panel
->
m_ClipBox
,
DC
,
m_Start
.
x
,
m_Start
.
y
,
rayon
,
color
);
if
(
fast_draw
)
int
drill_rayon
=
GetDrillValue
()
/
2
;
return
;
int
inner_rayon
=
rayon
-
panel
->
GetScreen
()
->
Unscale
(
2
);
GRCircle
(
&
panel
->
m_ClipBox
,
DC
,
m_Start
.
x
,
m_Start
.
y
,
GRCircle
(
&
panel
->
m_ClipBox
,
DC
,
m_Start
.
x
,
m_Start
.
y
,
inner_rayon
,
color
);
inner_rayon
,
color
);
}
// Draw the via hole if the display option allows it
// Draw the via hole if the display option allows it
if
(
DisplayOpt
.
m_DisplayViaMode
!=
VIA_HOLE_NOT_SHOW
)
if
(
DisplayOpt
.
m_DisplayViaMode
!=
VIA_HOLE_NOT_SHOW
)
{
{
if
(
(
DisplayOpt
.
m_DisplayViaMode
==
ALL_VIA_HOLE_SHOW
)
// Display all drill holes requested
if
(
(
DisplayOpt
.
m_DisplayViaMode
==
ALL_VIA_HOLE_SHOW
)
// Display all drill holes requested
||
(
(
drill_rayon
>
0
)
&&
!
IsDrillDefault
()
)
)
// Or Display non default holes requested
||
(
(
drill_rayon
>
0
)
&&
!
IsDrillDefault
()
)
)
// Or Display non default holes requested
{
if
(
drill_rayon
<
inner_rayon
)
// We can show the via hole
{
{
if
(
fillvia
)
if
(
fillvia
)
{
{
...
@@ -801,12 +809,12 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
...
@@ -801,12 +809,12 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
}
}
else
else
{
{
if
(
drill_rayon
<
inner_rayon
)
// We can show the via hole
GRCircle
(
&
panel
->
m_ClipBox
,
DC
,
m_Start
.
x
,
m_Start
.
y
,
GRCircle
(
&
panel
->
m_ClipBox
,
DC
,
m_Start
.
x
,
m_Start
.
y
,
drill_rayon
,
color
);
drill_rayon
,
color
);
}
}
}
}
}
}
}
if
(
DisplayOpt
.
ShowTrackClearanceMode
==
SHOW_CLEARANCE_ALWAYS
)
if
(
DisplayOpt
.
ShowTrackClearanceMode
==
SHOW_CLEARANCE_ALWAYS
)
GRCircle
(
&
panel
->
m_ClipBox
,
DC
,
m_Start
.
x
,
m_Start
.
y
,
GRCircle
(
&
panel
->
m_ClipBox
,
DC
,
m_Start
.
x
,
m_Start
.
y
,
...
@@ -912,6 +920,7 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame )
...
@@ -912,6 +920,7 @@ void TRACK::DisplayInfo( WinEDA_DrawFrame* frame )
}
}
}
}
/*
/*
* Function DisplayInfoBase
* Function DisplayInfoBase
* has knowledge about the frame and how and where to put status information
* has knowledge about the frame and how and where to put status information
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment