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
8bfdd040
Commit
8bfdd040
authored
Mar 13, 2008
by
charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use dirty rectangle when deleting a footprint
parent
c5b42440
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
9 deletions
+28
-9
class_module.cpp
pcbnew/class_module.cpp
+11
-0
class_module.h
pcbnew/class_module.h
+5
-0
modules.cpp
pcbnew/modules.cpp
+12
-9
No files found.
pcbnew/class_module.cpp
View file @
8bfdd040
...
@@ -1039,6 +1039,17 @@ void MODULE::SetRectangleExinscrit()
...
@@ -1039,6 +1039,17 @@ void MODULE::SetRectangleExinscrit()
}
}
/**
* Function GetBoundingBox
* returns the bounding box of this Footprint
*/
EDA_Rect
MODULE
::
GetBoundingBox
()
{
SetRectangleExinscrit
();
return
m_RealBoundaryBox
;
}
/*******************************************************/
/*******************************************************/
void
MODULE
::
Display_Infos
(
WinEDA_DrawFrame
*
frame
)
void
MODULE
::
Display_Infos
(
WinEDA_DrawFrame
*
frame
)
/*******************************************************/
/*******************************************************/
...
...
pcbnew/class_module.h
View file @
8bfdd040
...
@@ -84,6 +84,11 @@ public:
...
@@ -84,6 +84,11 @@ public:
void
SetRectangleExinscrit
();
/* mise a jour du rect d'encadrement
void
SetRectangleExinscrit
();
/* mise a jour du rect d'encadrement
* et de la surface en coord reelles */
* et de la surface en coord reelles */
/**
* Function GetBoundingBox
* returns the bounding box of this Footprint
*/
EDA_Rect
GetBoundingBox
();
/**
/**
* Function GetPosition
* Function GetPosition
...
...
pcbnew/modules.cpp
View file @
8bfdd040
...
@@ -262,10 +262,12 @@ void Montre_Position_Empreinte( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
...
@@ -262,10 +262,12 @@ void Montre_Position_Empreinte( WinEDA_DrawPanel* panel, wxDC* DC, bool erase )
bool
WinEDA_PcbFrame
::
Delete_Module
(
MODULE
*
module
,
wxDC
*
DC
)
bool
WinEDA_PcbFrame
::
Delete_Module
(
MODULE
*
module
,
wxDC
*
DC
)
/**************************************************************/
/**************************************************************/
/*
/**
* Commande Delete Module :
* Function Delete Module
* Suppression d'une empreinte
* Remove a footprint from m_Modules linked list and put it in undelete buffer
* les pointeurs divers sont mis a jour
* The net rastenes and pad list are recalcualed
* @param module = footprint to delete
* @param DC = currentDevice Context. if NULL: do not redraw new ratsnets and dirty rectange
*/
*/
{
{
EDA_BaseStruct
*
PtBack
,
*
PtNext
;
EDA_BaseStruct
*
PtBack
,
*
PtNext
;
...
@@ -288,14 +290,12 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module, wxDC* DC )
...
@@ -288,14 +290,12 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module, wxDC* DC )
m_CurrentScreen
->
SetModify
();
m_CurrentScreen
->
SetModify
();
/* Erase rastnest if needed */
/* Erase rastnest if needed
* Dirty rectangle is not used here because usually using a XOR draw mode gives good results (very few artefacts) for ratsnest
*/
if
(
g_Show_Ratsnest
)
if
(
g_Show_Ratsnest
)
DrawGeneralRatsnest
(
DC
);
DrawGeneralRatsnest
(
DC
);
/* Effacement du module a l'ecran */
if
(
DC
)
module
->
Draw
(
DrawPanel
,
DC
,
wxPoint
(
0
,
0
),
GR_XOR
);
/* Suppression du chainage */
/* Suppression du chainage */
PtBack
=
module
->
Pback
;
PtBack
=
module
->
Pback
;
PtNext
=
module
->
Pnext
;
PtNext
=
module
->
Pnext
;
...
@@ -316,6 +316,9 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module, wxDC* DC )
...
@@ -316,6 +316,9 @@ bool WinEDA_PcbFrame::Delete_Module( MODULE* module, wxDC* DC )
m_Pcb
->
m_Status_Pcb
=
0
;
m_Pcb
->
m_Status_Pcb
=
0
;
build_liste_pads
();
build_liste_pads
();
ReCompile_Ratsnest_After_Changes
(
DC
);
ReCompile_Ratsnest_After_Changes
(
DC
);
// redraw the area where the module was
if
(
DC
)
DrawPanel
->
PostDirtyRect
(
module
->
GetBoundingBox
()
);
return
TRUE
;
return
TRUE
;
}
}
...
...
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