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
0f0ced37
Commit
0f0ced37
authored
Mar 13, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
beautify
parent
0f06e2ad
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
675 additions
and
547 deletions
+675
-547
block.cpp
eeschema/block.cpp
+10
-2
cmpclass.cpp
eeschema/cmpclass.cpp
+25
-6
delete.cpp
eeschema/delete.cpp
+518
-442
erc.cpp
eeschema/erc.cpp
+102
-86
program.h
eeschema/program.h
+17
-11
schedit.cpp
eeschema/schedit.cpp
+3
-0
No files found.
eeschema/block.cpp
View file @
0f0ced37
...
...
@@ -932,7 +932,8 @@ void DeleteStruct( WinEDA_DrawPanel* panel, wxDC* DC, EDA_BaseStruct* DrawStruct
if
(
DrawStruct
->
Type
()
==
DRAW_SHEETLABEL_STRUCT_TYPE
)
{
/* Cette stucture est rattachee a une feuille, et n'est pas
{
/* Cette stucture est rattachee a une feuille, et n'est pas
* accessible par la liste globale directement */
frame
->
SaveCopyInUndoList
(
(
(
DrawSheetLabelStruct
*
)
DrawStruct
)
->
m_Parent
,
IS_CHANGED
);
frame
->
DeleteSheetLabel
(
DC
,
(
DrawSheetLabelStruct
*
)
DrawStruct
);
...
...
@@ -961,7 +962,14 @@ void DeleteStruct( WinEDA_DrawPanel* panel, wxDC* DC, EDA_BaseStruct* DrawStruct
{
screen
->
RemoveFromDrawList
(
DrawStruct
);
RedrawOneStruct
(
panel
,
DC
,
DrawStruct
,
g_XorMode
);
if
(
DrawStruct
->
Type
()
==
DRAW_SEGMENT_STRUCT_TYPE
)
{
D
(
printf
(
"PostDirtyRect()
\n
"
);
)
panel
->
PostDirtyRect
(
((
EDA_DrawLineStruct
*
)
DrawStruct
)
->
GetBoundingBox
()
);
}
else
RedrawOneStruct
(
panel
,
DC
,
DrawStruct
,
g_XorMode
);
/* Unlink the structure */
DrawStruct
->
Pnext
=
DrawStruct
->
Pback
=
NULL
;
// Only one struct -> no link
if
(
DrawStruct
->
Type
()
==
DRAW_SHEET_STRUCT_TYPE
)
...
...
eeschema/cmpclass.cpp
View file @
0f0ced37
...
...
@@ -147,14 +147,14 @@ wxString DrawMarkerStruct::GetComment()
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void
DrawMarkerStruct
::
Show
(
int
nestLevel
,
std
::
ostream
&
os
)
{
// for now, make it look like XML:
NestedSpace
(
nestLevel
,
os
)
<<
'<'
<<
GetClass
().
Lower
().
mb_str
()
<<
m_Pos
NestedSpace
(
nestLevel
,
os
)
<<
'<'
<<
GetClass
().
Lower
().
mb_str
()
<<
m_Pos
<<
"/>
\n
"
;
}
#endif
...
...
@@ -222,17 +222,17 @@ bool EDA_DrawLineStruct::IsOneEndPointAt( const wxPoint& pos )
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void
EDA_DrawLineStruct
::
Show
(
int
nestLevel
,
std
::
ostream
&
os
)
{
NestedSpace
(
nestLevel
,
os
)
<<
'<'
<<
GetClass
().
Lower
().
mb_str
()
<<
NestedSpace
(
nestLevel
,
os
)
<<
'<'
<<
GetClass
().
Lower
().
mb_str
()
<<
" layer=
\"
"
<<
m_Layer
<<
'"'
<<
" width=
\"
"
<<
m_Width
<<
'"'
<<
" startIsDangling=
\"
"
<<
m_StartIsDangling
<<
'"'
<<
" endIsDangling=
\"
"
<<
m_EndIsDangling
<<
'"'
<<
">"
<<
" startIsDangling=
\"
"
<<
m_StartIsDangling
<<
'"'
<<
" endIsDangling=
\"
"
<<
m_EndIsDangling
<<
'"'
<<
">"
<<
" <start"
<<
m_Start
<<
"/>"
<<
" <end"
<<
m_End
<<
"/>"
<<
"</"
<<
GetClass
().
Lower
().
mb_str
()
<<
">
\n
"
;
...
...
@@ -240,6 +240,25 @@ void EDA_DrawLineStruct::Show( int nestLevel, std::ostream& os )
#endif
EDA_Rect
EDA_DrawLineStruct
::
GetBoundingBox
()
const
{
int
width
=
25
;
int
xmin
=
MIN
(
m_Start
.
x
,
m_End
.
x
)
-
width
;
int
ymin
=
MIN
(
m_Start
.
y
,
m_End
.
y
)
-
width
;
int
xmax
=
MAX
(
m_Start
.
x
,
m_End
.
x
)
+
width
;
int
ymax
=
MAX
(
m_Start
.
y
,
m_End
.
y
)
+
width
;
// return a rectangle which is [pos,dim) in nature. therefore the +1
EDA_Rect
ret
(
wxPoint
(
xmin
,
ymin
),
wxSize
(
xmax
-
xmin
+
1
,
ymax
-
ymin
+
1
)
);
return
ret
;
}
/****************************/
/* Class DrawPolylineStruct */
/****************************/
...
...
eeschema/delete.cpp
View file @
0f0ced37
This diff is collapsed.
Click to expand it.
eeschema/erc.cpp
View file @
0f0ced37
This diff is collapsed.
Click to expand it.
eeschema/program.h
View file @
0f0ced37
...
...
@@ -76,7 +76,7 @@ public:
public
:
EDA_DrawLineStruct
(
const
wxPoint
&
pos
,
int
layer
);
~
EDA_DrawLineStruct
()
{
}
virtual
wxString
GetClass
()
const
{
return
wxT
(
"EDA_DrawLine"
);
...
...
@@ -92,19 +92,25 @@ public:
}
/**
* Function GetBoundingBox
* returns the bounding box of this TRACK
*/
EDA_Rect
GetBoundingBox
()
const
;
virtual
void
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
const
wxPoint
&
offset
,
int
draw_mode
,
int
Color
=
-
1
);
#if defined(DEBUG)
#if defined(DEBUG)
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void
Show
(
int
nestLevel
,
std
::
ostream
&
os
);
#endif
#endif
};
...
...
@@ -129,16 +135,16 @@ public:
wxString
GetComment
();
virtual
void
Draw
(
WinEDA_DrawPanel
*
panel
,
wxDC
*
DC
,
const
wxPoint
&
offset
,
int
draw_mode
,
int
Color
=
-
1
);
#if defined(DEBUG)
#if defined(DEBUG)
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void
Show
(
int
nestLevel
,
std
::
ostream
&
os
);
#endif
#endif
};
...
...
@@ -177,7 +183,7 @@ public:
public
:
DrawBusEntryStruct
(
const
wxPoint
&
pos
,
int
shape
,
int
id
);
~
DrawBusEntryStruct
()
{
}
virtual
wxString
GetClass
()
const
{
return
wxT
(
"DrawBusEntry"
);
...
...
@@ -201,7 +207,7 @@ public:
public
:
DrawPolylineStruct
(
int
layer
);
~
DrawPolylineStruct
();
virtual
wxString
GetClass
()
const
{
return
wxT
(
"DrawPolyline"
);
...
...
@@ -222,7 +228,7 @@ public:
public
:
DrawJunctionStruct
(
const
wxPoint
&
pos
);
~
DrawJunctionStruct
()
{
}
virtual
wxString
GetClass
()
const
{
return
wxT
(
"DrawJunction"
);
...
...
eeschema/schedit.cpp
View file @
0f0ced37
...
...
@@ -478,6 +478,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
DrawPanel
->
MouseToCursorSchema
();
if
(
GetScreen
()
->
GetCurItem
()
->
m_Flags
==
0
)
SaveCopyInUndoList
(
GetScreen
()
->
GetCurItem
(),
IS_CHANGED
);
CmpRotationMiroir
(
(
EDA_SchComponentStruct
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
,
option
);
...
...
@@ -497,6 +498,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
GetScreen
()
)
);
if
(
GetScreen
()
->
GetCurItem
()
==
NULL
)
break
;
EditComponentValue
(
(
EDA_SchComponentStruct
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
);
break
;
...
...
@@ -510,6 +512,7 @@ void WinEDA_SchematicFrame::Process_Special_Functions( wxCommandEvent& event )
GetScreen
()
)
);
if
(
GetScreen
()
->
GetCurItem
()
==
NULL
)
break
;
EditComponentReference
(
(
EDA_SchComponentStruct
*
)
GetScreen
()
->
GetCurItem
(),
&
dc
);
break
;
...
...
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