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
787cf585
Commit
787cf585
authored
Oct 11, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MenuText() tweaks, beautification
parent
f5fd16e2
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
144 additions
and
55 deletions
+144
-55
change_log.txt
change_log.txt
+8
-2
common.cpp
common/common.cpp
+2
-4
wxstruct.h
include/wxstruct.h
+1
-1
class_board_item.cpp
pcbnew/class_board_item.cpp
+3
-3
class_track.cpp
pcbnew/class_track.cpp
+20
-0
class_track.h
pcbnew/class_track.h
+6
-0
onleftclick.cpp
pcbnew/onleftclick.cpp
+0
-5
ratsnest.cpp
pcbnew/ratsnest.cpp
+104
-40
No files found.
change_log.txt
View file @
787cf585
...
@@ -26,10 +26,16 @@ email address.
...
@@ -26,10 +26,16 @@ email address.
2007-Oct-10 UPDATE Dick Hollenbeck <dick@softplc.com>
2007-Oct-10 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
================================================================================
+ pcbnew
+ pcbnew
*
prevent OnRightClick() from calling PcbGeneralLocateAndDisplay() when creating
*
bug fix: prevent OnRightClick() from calling PcbGeneralLocateAndDisplay()
a new track.
when creating
a new track.
* bug fix: popup menu was not handling Mires, because the collector was not
* bug fix: popup menu was not handling Mires, because the collector was not
being asked to find them.
being asked to find them.
* added TRACK::ShowWidth() and call it from BOARD_ITEM::MenuText(). There was
not enough information in Selection Clarification at a busy junction to
make a reasonable choice.
* SEGVIA::MenuText() shows via width, rather than net_code.
* Beautified ratsnets.cpp, I would like to understand it better. It would help
if the comments were in English.
+ all
+ all
* Changed English UI text "Mire" to "Target" according to this post:
* Changed English UI text "Mire" to "Target" according to this post:
http://tech.groups.yahoo.com/group/kicad-users/message/1380
http://tech.groups.yahoo.com/group/kicad-users/message/1380
...
...
common/common.cpp
View file @
787cf585
...
@@ -438,12 +438,10 @@ void valeur_param( int valeur, wxString& buf_texte )
...
@@ -438,12 +438,10 @@ void valeur_param( int valeur, wxString& buf_texte )
{
{
if
(
g_UnitMetric
)
if
(
g_UnitMetric
)
{
{
buf_texte
.
Printf
(
wxT
(
"%3.3f "
),
(
float
)
valeur
*
0.00254
);
buf_texte
.
Printf
(
wxT
(
"%3.3f mm"
),
valeur
*
0.00254
);
buf_texte
<<
wxT
(
"mm"
);
}
}
else
else
{
{
buf_texte
.
Printf
(
wxT
(
"%2.4f "
),
(
float
)
valeur
*
0.0001
);
buf_texte
.
Printf
(
wxT
(
"%2.4f
\"
"
),
valeur
*
0.0001
);
buf_texte
<<
wxT
(
"
\"
"
);
}
}
}
}
include/wxstruct.h
View file @
787cf585
...
@@ -1369,7 +1369,7 @@ private:
...
@@ -1369,7 +1369,7 @@ private:
/**
/**
* Struct MsgItem
* Struct MsgItem
* is used privately by WinEDA_MsgPanel as the item type its vector.
* is used privately by WinEDA_MsgPanel as the item type
of
its vector.
* These items are the pairs of text strings shown in the MsgPanel.
* These items are the pairs of text strings shown in the MsgPanel.
*/
*/
struct
MsgItem
struct
MsgItem
...
...
pcbnew/class_board_item.cpp
View file @
787cf585
...
@@ -124,8 +124,8 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
...
@@ -124,8 +124,8 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
break
;
break
;
case
TYPETRACK
:
case
TYPETRACK
:
text
<<
_
(
"Track"
)
<<
wxT
(
" "
);
text
<<
_
(
"Track"
)
<<
wxT
(
" "
)
<<
((
TRACK
*
)
item
)
->
ShowWidth
()
;
net
=
aPcb
->
FindNet
(
(
(
TRACK
*
)
item
)
->
m_NetCode
);
net
=
aPcb
->
FindNet
(
(
(
TRACK
*
)
item
)
->
m_NetCode
);
if
(
net
)
if
(
net
)
{
{
text
<<
wxT
(
" ["
)
<<
net
->
m_Netname
<<
wxT
(
"]"
);
text
<<
wxT
(
" ["
)
<<
net
->
m_Netname
<<
wxT
(
"]"
);
...
@@ -151,7 +151,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
...
@@ -151,7 +151,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
case
TYPEVIA
:
case
TYPEVIA
:
{
{
SEGVIA
*
via
=
(
SEGVIA
*
)
item
;
SEGVIA
*
via
=
(
SEGVIA
*
)
item
;
text
<<
_
(
"Via"
)
<<
wxT
(
" "
)
<<
via
->
m_NetCode
;
text
<<
_
(
"Via"
)
<<
wxT
(
" "
)
<<
via
->
ShowWidth
()
;
int
shape
=
via
->
Shape
();
int
shape
=
via
->
Shape
();
if
(
shape
==
VIA_ENTERREE
)
if
(
shape
==
VIA_ENTERREE
)
...
...
pcbnew/class_track.cpp
View file @
787cf585
...
@@ -35,6 +35,26 @@ TRACK::TRACK( BOARD_ITEM* StructFather, KICAD_T idtype ) :
...
@@ -35,6 +35,26 @@ TRACK::TRACK( BOARD_ITEM* StructFather, KICAD_T idtype ) :
}
}
wxString
TRACK
::
ShowWidth
()
{
wxString
msg
;
#if 0
double value = To_User_Unit( g_UnitMetric, m_Width, PCB_INTERNAL_UNIT );
if( g_UnitMetric == INCHES ) // Affichage en mils
msg.Printf( wxT( "%.1f" ), value * 1000 );
else
msg.Printf( wxT( "%.3f" ), value );
#else
valeur_param
(
m_Width
,
msg
);
#endif
return
msg
;
}
SEGZONE
::
SEGZONE
(
BOARD_ITEM
*
StructFather
)
:
SEGZONE
::
SEGZONE
(
BOARD_ITEM
*
StructFather
)
:
TRACK
(
StructFather
,
TYPEZONE
)
TRACK
(
StructFather
,
TYPEZONE
)
...
...
pcbnew/class_track.h
View file @
787cf585
...
@@ -119,6 +119,12 @@ public:
...
@@ -119,6 +119,12 @@ public:
void
Display_Infos
(
WinEDA_DrawFrame
*
frame
);
void
Display_Infos
(
WinEDA_DrawFrame
*
frame
);
/**
* Function ShowWidth
* returns the width of the track in displayable user units.
*/
wxString
ShowWidth
();
/**
/**
* Function Visit
* Function Visit
* is re-implemented here because TRACKs and SEGVIAs are in the same list
* is re-implemented here because TRACKs and SEGVIAs are in the same list
...
...
pcbnew/onleftclick.cpp
View file @
787cf585
...
@@ -132,12 +132,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -132,12 +132,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
break
;
break
;
case
ID_PCB_SHOW_1_RATSNEST_BUTT
:
case
ID_PCB_SHOW_1_RATSNEST_BUTT
:
#if 0
DrawStruct = m_Pcb->FindPadOrModule( GetScreen()->RefPos(true),
GetScreen()->m_Active_Layer );
#else
DrawStruct
=
PcbGeneralLocateAndDisplay
();
DrawStruct
=
PcbGeneralLocateAndDisplay
();
#endif
Show_1_Ratsnest
(
DrawStruct
,
DC
);
Show_1_Ratsnest
(
DrawStruct
,
DC
);
if
(
DrawStruct
)
if
(
DrawStruct
)
...
...
pcbnew/ratsnest.cpp
View file @
787cf585
This diff is collapsed.
Click to expand it.
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