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
0c0b2a40
Commit
0c0b2a40
authored
Jan 09, 2009
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pcbnew: allows autopan when editin or creating a zone
parent
31e3e985
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
49 deletions
+54
-49
tracepcb.cpp
gerbview/tracepcb.cpp
+1
-1
edit.cpp
pcbnew/edit.cpp
+39
-31
editrack.cpp
pcbnew/editrack.cpp
+0
-8
onleftclick.cpp
pcbnew/onleftclick.cpp
+14
-9
No files found.
gerbview/tracepcb.cpp
View file @
0c0b2a40
...
...
@@ -113,7 +113,7 @@ void WinEDA_GerberFrame::Trace_Gerber( wxDC* DC, int draw_mode, int printmasklay
if
(
!
GetBoard
()
)
return
;
bool
erase
;
bool
erase
=
false
;
int
Color
;
bool
filled
;
...
...
pcbnew/edit.cpp
View file @
0c0b2a40
This diff is collapsed.
Click to expand it.
pcbnew/editrack.cpp
View file @
0c0b2a40
...
...
@@ -96,8 +96,6 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
if
(
aTrack
==
NULL
)
/* Starting a new track */
{
D
(
printf
(
"Begin_Route NULL
\n
"
);)
/* erase old highlight */
OldNetCodeSurbrillance
=
g_HightLigth_NetCode
;
OldEtatSurbrillance
=
g_HightLigt_Status
;
...
...
@@ -148,10 +146,6 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
Hight_Light
(
DC
);
/* done above
g_CurrentTrackSegment->m_Flags = IS_NEW;
*/
g_CurrentTrackSegment
->
SetLayer
(
((
PCB_SCREEN
*
)
GetScreen
())
->
m_Active_Layer
);
g_CurrentTrackSegment
->
m_Width
=
g_DesignSettings
.
m_CurrentTrackWidth
;
...
...
@@ -205,8 +199,6 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
}
else
/* Track in progress : segment coordinates are updated by ShowNewTrackWhenMovingCursor*/
{
D
(
printf
(
"Begin_Route in progress
\n
"
);)
/* Tst for a D.R.C. error: */
if
(
Drc_On
)
{
...
...
pcbnew/onleftclick.cpp
View file @
0c0b2a40
...
...
@@ -30,7 +30,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
if
(
(
m_ID_current_state
==
0
)
||
(
DrawStruct
&&
DrawStruct
->
m_Flags
)
)
{
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
false
;
if
(
DrawStruct
&&
DrawStruct
->
m_Flags
)
// "POPUP" in progress
{
DrawPanel
->
m_IgnoreMouseEvents
=
TRUE
;
...
...
@@ -40,7 +40,10 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{
case
TYPE_ZONE_CONTAINER
:
if
(
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
{
DrawPanel
->
m_AutoPAN_Request
=
true
;
Begin_Zone
(
DC
);
}
else
End_Move_Zone_Corner_Or_Outlines
(
DC
,
(
ZONE_CONTAINER
*
)
DrawStruct
);
exit
=
true
;
...
...
@@ -98,7 +101,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
break
;
}
DrawPanel
->
m_IgnoreMouseEvents
=
FALSE
;
DrawPanel
->
m_IgnoreMouseEvents
=
false
;
DrawPanel
->
CursorOn
(
DC
);
if
(
exit
)
return
;
}
...
...
@@ -225,6 +228,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{
if
(
Begin_Zone
(
DC
)
)
{
DrawPanel
->
m_AutoPAN_Request
=
true
;
DrawStruct
=
GetBoard
()
->
m_CurrentZoneContour
;
GetScreen
()
->
SetCurItem
(
DrawStruct
);
}
...
...
@@ -233,6 +237,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
&&
(
DrawStruct
->
Type
()
==
TYPE_ZONE_CONTAINER
)
&&
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
{
DrawPanel
->
m_AutoPAN_Request
=
true
;
Begin_Zone
(
DC
);
DrawStruct
=
GetBoard
()
->
m_CurrentZoneContour
;
GetScreen
()
->
SetCurItem
(
DrawStruct
);
...
...
@@ -251,7 +256,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
else
if
(
DrawStruct
->
Type
()
==
TYPE_TEXTE
)
{
Place_Texte_Pcb
(
(
TEXTE_PCB
*
)
DrawStruct
,
DC
);
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
false
;
}
else
DisplayError
(
this
,
wxT
(
"Internal err: Struct not TYPE_TEXTE"
)
);
...
...
@@ -269,7 +274,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
else
if
(
DrawStruct
->
Type
()
==
TYPE_MODULE
)
{
Place_Module
(
(
MODULE
*
)
DrawStruct
,
DC
);
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
false
;
}
else
DisplayError
(
this
,
wxT
(
"Internal err: Struct not TYPE_MODULE"
)
);
...
...
@@ -363,7 +368,7 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
if
(
DrawStruct
->
m_Flags
&
IS_NEW
)
{
End_Route
(
(
TRACK
*
)
DrawStruct
,
DC
);
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
false
;
}
else
if
(
DrawStruct
->
m_Flags
==
0
)
{
...
...
@@ -421,14 +426,14 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
if
(
DrawStruct
&&
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
{
End_Route
(
(
TRACK
*
)
DrawStruct
,
DC
);
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
false
;
}
break
;
case
ID_PCB_ZONES_BUTT
:
if
(
End_Zone
(
DC
)
)
{
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
false
;
SetCurItem
(
NULL
);
}
break
;
...
...
@@ -441,13 +446,13 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
if
(
DrawStruct
->
Type
()
!=
TYPE_DRAWSEGMENT
)
{
DisplayError
(
this
,
wxT
(
"DrawStruct Type error"
)
);
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
false
;
break
;
}
if
(
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
{
End_Edge
(
(
DRAWSEGMENT
*
)
DrawStruct
,
&
dc
);
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
false
;
SetCurItem
(
NULL
);
}
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