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
6b097a57
Commit
6b097a57
authored
Jan 10, 2012
by
marco.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MacOSX: Drag Modules and Tracks now works correctly
parent
1c982007
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
class_track.cpp
pcbnew/class_track.cpp
+6
-0
move_or_drag_track.cpp
pcbnew/move_or_drag_track.cpp
+9
-0
No files found.
pcbnew/class_track.cpp
View file @
6b097a57
...
@@ -614,6 +614,12 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wxPoint&
...
@@ -614,6 +614,12 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wxPoint&
if
(
brd
->
IsLayerVisible
(
m_Layer
)
==
false
&&
!
(
draw_mode
&
GR_HIGHLIGHT
)
)
if
(
brd
->
IsLayerVisible
(
m_Layer
)
==
false
&&
!
(
draw_mode
&
GR_HIGHLIGHT
)
)
return
;
return
;
#ifdef USE_WX_OVERLAY
// If dragged not draw in OnPaint otherwise remains impressed in wxOverlay
if
(
(
m_Flags
&&
IS_DRAGGED
)
&&
DC
->
IsKindOf
(
wxCLASSINFO
(
wxPaintDC
)))
return
;
#endif
if
(
DisplayOpt
.
ContrastModeDisplay
)
if
(
DisplayOpt
.
ContrastModeDisplay
)
{
{
if
(
!
IsOnLayer
(
curr_layer
)
)
if
(
!
IsOnLayer
(
curr_layer
)
)
...
...
pcbnew/move_or_drag_track.cpp
View file @
6b097a57
...
@@ -172,7 +172,11 @@ static void Show_MoveNode( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPo
...
@@ -172,7 +172,11 @@ static void Show_MoveNode( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPo
DisplayOpt
.
DisplayPcbTrackFill
=
false
;
DisplayOpt
.
DisplayPcbTrackFill
=
false
;
#ifndef USE_WX_OVERLAY
aErase
=
true
;
aErase
=
true
;
#else
aErase
=
false
;
#endif
/* erase the current moved track segments from screen */
/* erase the current moved track segments from screen */
if
(
aErase
)
if
(
aErase
)
...
@@ -181,6 +185,7 @@ static void Show_MoveNode( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPo
...
@@ -181,6 +185,7 @@ static void Show_MoveNode( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPo
DrawTraces
(
aPanel
,
aDC
,
NewTrack
,
NbPtNewTrack
,
draw_mode
);
DrawTraces
(
aPanel
,
aDC
,
NewTrack
,
NbPtNewTrack
,
draw_mode
);
}
}
/* set the new track coordinates */
/* set the new track coordinates */
wxPoint
Pos
=
screen
->
GetCrossHairPosition
();
wxPoint
Pos
=
screen
->
GetCrossHairPosition
();
...
@@ -199,8 +204,10 @@ static void Show_MoveNode( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPo
...
@@ -199,8 +204,10 @@ static void Show_MoveNode( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPo
Track
->
m_End
+=
moveVector
;
Track
->
m_End
+=
moveVector
;
}
}
#ifndef USE_WX_OVERLAY
/* Redraw the current moved track segments */
/* Redraw the current moved track segments */
DrawTraces
(
aPanel
,
aDC
,
NewTrack
,
NbPtNewTrack
,
draw_mode
);
DrawTraces
(
aPanel
,
aDC
,
NewTrack
,
NbPtNewTrack
,
draw_mode
);
#endif
for
(
unsigned
ii
=
0
;
ii
<
g_DragSegmentList
.
size
();
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
g_DragSegmentList
.
size
();
ii
++
)
{
{
...
@@ -318,6 +325,7 @@ static void Show_Drag_Track_Segment_With_Cte_Slope( EDA_DRAW_PANEL* aPanel, wxDC
...
@@ -318,6 +325,7 @@ static void Show_Drag_Track_Segment_With_Cte_Slope( EDA_DRAW_PANEL* aPanel, wxDC
/* Undraw the current moved track segments before modification*/
/* Undraw the current moved track segments before modification*/
#ifndef USE_WX_OVERLAY
// if( erase )
// if( erase )
{
{
Track
->
Draw
(
aPanel
,
aDC
,
draw_mode
);
Track
->
Draw
(
aPanel
,
aDC
,
draw_mode
);
...
@@ -328,6 +336,7 @@ static void Show_Drag_Track_Segment_With_Cte_Slope( EDA_DRAW_PANEL* aPanel, wxDC
...
@@ -328,6 +336,7 @@ static void Show_Drag_Track_Segment_With_Cte_Slope( EDA_DRAW_PANEL* aPanel, wxDC
if
(
tSegmentToEnd
)
if
(
tSegmentToEnd
)
tSegmentToEnd
->
Draw
(
aPanel
,
aDC
,
draw_mode
);
tSegmentToEnd
->
Draw
(
aPanel
,
aDC
,
draw_mode
);
}
}
#endif
/* Compute the new track segment position */
/* Compute the new track segment position */
wxPoint
Pos
=
screen
->
GetCrossHairPosition
();
wxPoint
Pos
=
screen
->
GetCrossHairPosition
();
...
...
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