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
e724e4fd
Commit
e724e4fd
authored
Mar 10, 2008
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete net uses dirty rect
parent
bc04d5e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
17 deletions
+22
-17
change_log.txt
change_log.txt
+2
-0
deltrack.cpp
pcbnew/deltrack.cpp
+16
-15
drawpanel.cpp
share/drawpanel.cpp
+4
-2
No files found.
change_log.txt
View file @
e724e4fd
...
@@ -24,6 +24,8 @@ email address.
...
@@ -24,6 +24,8 @@ email address.
* Added WinEDA_DrawPanel::PostDirtyRect()
* Added WinEDA_DrawPanel::PostDirtyRect()
* Renamed Supprime_Une_Piste() to Remove_One_Track() and it now uses
* Renamed Supprime_Une_Piste() to Remove_One_Track() and it now uses
PostDirtyRect().
PostDirtyRect().
* void WinEDA_PcbFrame::Delete_net( wxDC* DC, TRACK* Track ) now redraws
the screen after a net deletion.
2008-Mar-10 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
2008-Mar-10 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
...
...
pcbnew/deltrack.cpp
View file @
e724e4fd
...
@@ -149,33 +149,34 @@ void WinEDA_PcbFrame::Delete_Track( wxDC* DC, TRACK* Track )
...
@@ -149,33 +149,34 @@ void WinEDA_PcbFrame::Delete_Track( wxDC* DC, TRACK* Track )
void
WinEDA_PcbFrame
::
Delete_net
(
wxDC
*
DC
,
TRACK
*
Track
)
void
WinEDA_PcbFrame
::
Delete_net
(
wxDC
*
DC
,
TRACK
*
Track
)
/********************************************************/
/********************************************************/
{
{
TRACK
*
pt_segm
,
*
pt_start
;
if
(
Track
==
NULL
)
int
ii
;
int
net_code_delete
;
pt_segm
=
Track
;
if
(
pt_segm
==
NULL
)
return
;
return
;
if
(
IsOK
(
this
,
_
(
"Delete NET ?"
)
)
)
if
(
IsOK
(
this
,
_
(
"Delete NET ?"
)
)
)
{
{
net_code_delete
=
pt_segm
->
GetNet
();
int
net_code_delete
=
Track
->
GetNet
();
/* Recherche du debut de la zone des pistes du net_code courant */
/* Recherche du debut de la zone des pistes du net_code courant */
pt_star
t
=
m_Pcb
->
m_Track
->
GetStartNetCode
(
net_code_delete
);
TRACK
*
trackLis
t
=
m_Pcb
->
m_Track
->
GetStartNetCode
(
net_code_delete
);
/* Decompte du nombre de segments de la sous-chaine */
/* Decompte du nombre de segments de la sous-chaine */
pt_segm
=
pt_start
;
for
(
ii
=
0
;
pt_segm
!=
NULL
;
pt_segm
=
(
TRACK
*
)
pt_segm
->
Pnext
)
int
ii
;
TRACK
*
segm
=
trackList
;
for
(
ii
=
0
;
segm
;
segm
=
segm
->
Next
(),
++
ii
)
{
{
if
(
pt_
segm
->
GetNet
()
!=
net_code_delete
)
if
(
segm
->
GetNet
()
!=
net_code_delete
)
break
;
break
;
ii
++
;
// This works ok, but sometimes leaves stuff on screen. I think
// the erase rectangle is not large enough always.
// DrawPanel->PostDirtyRect( segm->GetBoundingBox() );
}
}
Trace_Une_Piste
(
DrawPanel
,
DC
,
pt_start
,
ii
,
GR_XOR
);
// Do this instead of PostDirtyRect() for now
DrawPanel
->
Refresh
(
TRUE
);
SaveItemEfface
(
pt_star
t
,
ii
);
SaveItemEfface
(
trackLis
t
,
ii
);
GetScreen
()
->
SetModify
();
GetScreen
()
->
SetModify
();
test_1_net_connexion
(
DC
,
net_code_delete
);
test_1_net_connexion
(
DC
,
net_code_delete
);
m_Pcb
->
Display_Infos
(
this
);
m_Pcb
->
Display_Infos
(
this
);
...
...
share/drawpanel.cpp
View file @
e724e4fd
...
@@ -271,8 +271,9 @@ void WinEDA_DrawPanel::PostDirtyRect( EDA_Rect aRect )
...
@@ -271,8 +271,9 @@ void WinEDA_DrawPanel::PostDirtyRect( EDA_Rect aRect )
// Convert the rect coordinates and size to pixels (make a draw clip box):
// Convert the rect coordinates and size to pixels (make a draw clip box):
ConvertPcbUnitsToPixelsUnits
(
&
aRect
);
ConvertPcbUnitsToPixelsUnits
(
&
aRect
);
// Ensure the last line and column are in the dirty rectangle after truncations.
// Ensure the rectangle is large enough after truncations.
// The pcb units have finer granularity than the pixels, so this can happen.
// The pcb units have finer granularity than the pixels, so it can happen
// that the rectangle is not large enough for the erase portion.
aRect
.
m_Size
.
x
+=
1
;
aRect
.
m_Size
.
x
+=
1
;
aRect
.
m_Size
.
y
+=
1
;
aRect
.
m_Size
.
y
+=
1
;
...
@@ -538,6 +539,7 @@ void WinEDA_DrawPanel::EraseScreen( wxDC* DC )
...
@@ -538,6 +539,7 @@ void WinEDA_DrawPanel::EraseScreen( wxDC* DC )
/*********************************************/
/*********************************************/
{
{
GRSetDrawMode
(
DC
,
GR_COPY
);
GRSetDrawMode
(
DC
,
GR_COPY
);
GRSFilledRect
(
&
m_ClipBox
,
DC
,
m_ClipBox
.
GetX
(),
m_ClipBox
.
GetY
(),
GRSFilledRect
(
&
m_ClipBox
,
DC
,
m_ClipBox
.
GetX
(),
m_ClipBox
.
GetY
(),
m_ClipBox
.
GetRight
(),
m_ClipBox
.
GetBottom
(),
m_ClipBox
.
GetRight
(),
m_ClipBox
.
GetBottom
(),
g_DrawBgColor
,
g_DrawBgColor
);
g_DrawBgColor
,
g_DrawBgColor
);
...
...
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