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
Show 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
...
@@ -113,7 +113,7 @@ void WinEDA_GerberFrame::Trace_Gerber( wxDC* DC, int draw_mode, int printmasklay
if
(
!
GetBoard
()
)
if
(
!
GetBoard
()
)
return
;
return
;
bool
erase
;
bool
erase
=
false
;
int
Color
;
int
Color
;
bool
filled
;
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 )
...
@@ -96,8 +96,6 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
if
(
aTrack
==
NULL
)
/* Starting a new track */
if
(
aTrack
==
NULL
)
/* Starting a new track */
{
{
D
(
printf
(
"Begin_Route NULL
\n
"
);)
/* erase old highlight */
/* erase old highlight */
OldNetCodeSurbrillance
=
g_HightLigth_NetCode
;
OldNetCodeSurbrillance
=
g_HightLigth_NetCode
;
OldEtatSurbrillance
=
g_HightLigt_Status
;
OldEtatSurbrillance
=
g_HightLigt_Status
;
...
@@ -148,10 +146,6 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
...
@@ -148,10 +146,6 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
Hight_Light
(
DC
);
Hight_Light
(
DC
);
/* done above
g_CurrentTrackSegment->m_Flags = IS_NEW;
*/
g_CurrentTrackSegment
->
SetLayer
(
((
PCB_SCREEN
*
)
GetScreen
())
->
m_Active_Layer
);
g_CurrentTrackSegment
->
SetLayer
(
((
PCB_SCREEN
*
)
GetScreen
())
->
m_Active_Layer
);
g_CurrentTrackSegment
->
m_Width
=
g_DesignSettings
.
m_CurrentTrackWidth
;
g_CurrentTrackSegment
->
m_Width
=
g_DesignSettings
.
m_CurrentTrackWidth
;
...
@@ -205,8 +199,6 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
...
@@ -205,8 +199,6 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* aTrack, wxDC* DC )
}
}
else
/* Track in progress : segment coordinates are updated by ShowNewTrackWhenMovingCursor*/
else
/* Track in progress : segment coordinates are updated by ShowNewTrackWhenMovingCursor*/
{
{
D
(
printf
(
"Begin_Route in progress
\n
"
);)
/* Tst for a D.R.C. error: */
/* Tst for a D.R.C. error: */
if
(
Drc_On
)
if
(
Drc_On
)
{
{
...
...
pcbnew/onleftclick.cpp
View file @
0c0b2a40
...
@@ -30,7 +30,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -30,7 +30,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
if
(
(
m_ID_current_state
==
0
)
||
(
DrawStruct
&&
DrawStruct
->
m_Flags
)
)
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
if
(
DrawStruct
&&
DrawStruct
->
m_Flags
)
// "POPUP" in progress
{
{
DrawPanel
->
m_IgnoreMouseEvents
=
TRUE
;
DrawPanel
->
m_IgnoreMouseEvents
=
TRUE
;
...
@@ -40,7 +40,10 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -40,7 +40,10 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{
{
case
TYPE_ZONE_CONTAINER
:
case
TYPE_ZONE_CONTAINER
:
if
(
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
if
(
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
{
DrawPanel
->
m_AutoPAN_Request
=
true
;
Begin_Zone
(
DC
);
Begin_Zone
(
DC
);
}
else
else
End_Move_Zone_Corner_Or_Outlines
(
DC
,
(
ZONE_CONTAINER
*
)
DrawStruct
);
End_Move_Zone_Corner_Or_Outlines
(
DC
,
(
ZONE_CONTAINER
*
)
DrawStruct
);
exit
=
true
;
exit
=
true
;
...
@@ -98,7 +101,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -98,7 +101,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
break
;
break
;
}
}
DrawPanel
->
m_IgnoreMouseEvents
=
FALSE
;
DrawPanel
->
m_IgnoreMouseEvents
=
false
;
DrawPanel
->
CursorOn
(
DC
);
DrawPanel
->
CursorOn
(
DC
);
if
(
exit
)
return
;
if
(
exit
)
return
;
}
}
...
@@ -225,6 +228,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -225,6 +228,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
{
{
if
(
Begin_Zone
(
DC
)
)
if
(
Begin_Zone
(
DC
)
)
{
{
DrawPanel
->
m_AutoPAN_Request
=
true
;
DrawStruct
=
GetBoard
()
->
m_CurrentZoneContour
;
DrawStruct
=
GetBoard
()
->
m_CurrentZoneContour
;
GetScreen
()
->
SetCurItem
(
DrawStruct
);
GetScreen
()
->
SetCurItem
(
DrawStruct
);
}
}
...
@@ -233,6 +237,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -233,6 +237,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
&&
(
DrawStruct
->
Type
()
==
TYPE_ZONE_CONTAINER
)
&&
(
DrawStruct
->
Type
()
==
TYPE_ZONE_CONTAINER
)
&&
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
&&
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
{
{
DrawPanel
->
m_AutoPAN_Request
=
true
;
Begin_Zone
(
DC
);
Begin_Zone
(
DC
);
DrawStruct
=
GetBoard
()
->
m_CurrentZoneContour
;
DrawStruct
=
GetBoard
()
->
m_CurrentZoneContour
;
GetScreen
()
->
SetCurItem
(
DrawStruct
);
GetScreen
()
->
SetCurItem
(
DrawStruct
);
...
@@ -251,7 +256,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -251,7 +256,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
else
if
(
DrawStruct
->
Type
()
==
TYPE_TEXTE
)
else
if
(
DrawStruct
->
Type
()
==
TYPE_TEXTE
)
{
{
Place_Texte_Pcb
(
(
TEXTE_PCB
*
)
DrawStruct
,
DC
);
Place_Texte_Pcb
(
(
TEXTE_PCB
*
)
DrawStruct
,
DC
);
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
false
;
}
}
else
else
DisplayError
(
this
,
wxT
(
"Internal err: Struct not TYPE_TEXTE"
)
);
DisplayError
(
this
,
wxT
(
"Internal err: Struct not TYPE_TEXTE"
)
);
...
@@ -269,7 +274,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -269,7 +274,7 @@ void WinEDA_PcbFrame::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
else
if
(
DrawStruct
->
Type
()
==
TYPE_MODULE
)
else
if
(
DrawStruct
->
Type
()
==
TYPE_MODULE
)
{
{
Place_Module
(
(
MODULE
*
)
DrawStruct
,
DC
);
Place_Module
(
(
MODULE
*
)
DrawStruct
,
DC
);
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
false
;
}
}
else
else
DisplayError
(
this
,
wxT
(
"Internal err: Struct not TYPE_MODULE"
)
);
DisplayError
(
this
,
wxT
(
"Internal err: Struct not TYPE_MODULE"
)
);
...
@@ -363,7 +368,7 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -363,7 +368,7 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
if
(
DrawStruct
->
m_Flags
&
IS_NEW
)
if
(
DrawStruct
->
m_Flags
&
IS_NEW
)
{
{
End_Route
(
(
TRACK
*
)
DrawStruct
,
DC
);
End_Route
(
(
TRACK
*
)
DrawStruct
,
DC
);
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
false
;
}
}
else
if
(
DrawStruct
->
m_Flags
==
0
)
else
if
(
DrawStruct
->
m_Flags
==
0
)
{
{
...
@@ -421,14 +426,14 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -421,14 +426,14 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
if
(
DrawStruct
&&
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
if
(
DrawStruct
&&
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
{
{
End_Route
(
(
TRACK
*
)
DrawStruct
,
DC
);
End_Route
(
(
TRACK
*
)
DrawStruct
,
DC
);
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
false
;
}
}
break
;
break
;
case
ID_PCB_ZONES_BUTT
:
case
ID_PCB_ZONES_BUTT
:
if
(
End_Zone
(
DC
)
)
if
(
End_Zone
(
DC
)
)
{
{
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
false
;
SetCurItem
(
NULL
);
SetCurItem
(
NULL
);
}
}
break
;
break
;
...
@@ -441,13 +446,13 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
...
@@ -441,13 +446,13 @@ void WinEDA_PcbFrame::OnLeftDClick( wxDC* DC, const wxPoint& MousePos )
if
(
DrawStruct
->
Type
()
!=
TYPE_DRAWSEGMENT
)
if
(
DrawStruct
->
Type
()
!=
TYPE_DRAWSEGMENT
)
{
{
DisplayError
(
this
,
wxT
(
"DrawStruct Type error"
)
);
DisplayError
(
this
,
wxT
(
"DrawStruct Type error"
)
);
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
false
;
break
;
break
;
}
}
if
(
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
if
(
(
DrawStruct
->
m_Flags
&
IS_NEW
)
)
{
{
End_Edge
(
(
DRAWSEGMENT
*
)
DrawStruct
,
&
dc
);
End_Edge
(
(
DRAWSEGMENT
*
)
DrawStruct
,
&
dc
);
DrawPanel
->
m_AutoPAN_Request
=
FALSE
;
DrawPanel
->
m_AutoPAN_Request
=
false
;
SetCurItem
(
NULL
);
SetCurItem
(
NULL
);
}
}
break
;
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