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
f6962b62
Commit
f6962b62
authored
Aug 11, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor change when deleting a pad in modedit: the pad is deleted silently
parent
b3f13be3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
27 deletions
+34
-27
wxBasePcbFrame.h
include/wxBasePcbFrame.h
+8
-1
editmod.cpp
pcbnew/editmod.cpp
+1
-1
modedit.cpp
pcbnew/modedit.cpp
+1
-1
modedit_onclick.cpp
pcbnew/modedit_onclick.cpp
+3
-9
move-drag_pads.cpp
pcbnew/move-drag_pads.cpp
+21
-15
No files found.
include/wxBasePcbFrame.h
View file @
f6962b62
...
@@ -257,7 +257,14 @@ public:
...
@@ -257,7 +257,14 @@ public:
wxDC
*
DC
);
wxDC
*
DC
);
void
AddPad
(
MODULE
*
Module
,
bool
draw
);
void
AddPad
(
MODULE
*
Module
,
bool
draw
);
void
DeletePad
(
D_PAD
*
Pad
);
/** Function DeletePad
* Delete the pad aPad.
* Refresh the modified screen area
* Refresh modified parameters of the parent module (bounding box, last date)
* @param aPad = the pad to delete
* @param aQuery = true to promt for confirmation, false to delete silently
*/
void
DeletePad
(
D_PAD
*
aPad
,
bool
aQuery
=
true
);
void
StartMovePad
(
D_PAD
*
Pad
,
wxDC
*
DC
);
void
StartMovePad
(
D_PAD
*
Pad
,
wxDC
*
DC
);
void
RotatePad
(
D_PAD
*
Pad
,
wxDC
*
DC
);
void
RotatePad
(
D_PAD
*
Pad
,
wxDC
*
DC
);
void
PlacePad
(
D_PAD
*
Pad
,
wxDC
*
DC
);
void
PlacePad
(
D_PAD
*
Pad
,
wxDC
*
DC
);
...
...
pcbnew/editmod.cpp
View file @
f6962b62
...
@@ -118,7 +118,7 @@ void WinEDA_ModuleEditFrame::RemoveStruct( EDA_BaseStruct* Item )
...
@@ -118,7 +118,7 @@ void WinEDA_ModuleEditFrame::RemoveStruct( EDA_BaseStruct* Item )
switch
(
Item
->
Type
()
)
switch
(
Item
->
Type
()
)
{
{
case
TYPE_PAD
:
case
TYPE_PAD
:
DeletePad
(
(
D_PAD
*
)
Item
);
DeletePad
(
(
D_PAD
*
)
Item
,
false
);
break
;
break
;
case
TYPE_TEXTE_MODULE
:
case
TYPE_TEXTE_MODULE
:
...
...
pcbnew/modedit.cpp
View file @
f6962b62
...
@@ -518,7 +518,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
...
@@ -518,7 +518,7 @@ void WinEDA_ModuleEditFrame::Process_Special_Functions( wxCommandEvent& event )
case
ID_POPUP_PCB_DELETE_PAD
:
case
ID_POPUP_PCB_DELETE_PAD
:
SaveCopyInUndoList
(
GetBoard
()
->
m_Modules
,
UR_MODEDIT
);
SaveCopyInUndoList
(
GetBoard
()
->
m_Modules
,
UR_MODEDIT
);
DeletePad
(
(
D_PAD
*
)
GetScreen
()
->
GetCurItem
()
);
DeletePad
(
(
D_PAD
*
)
GetScreen
()
->
GetCurItem
()
,
false
);
SetCurItem
(
NULL
);
SetCurItem
(
NULL
);
DrawPanel
->
MouseToCursorSchema
();
DrawPanel
->
MouseToCursorSchema
();
break
;
break
;
...
...
pcbnew/modedit_onclick.cpp
View file @
f6962b62
...
@@ -116,19 +116,13 @@ m_Flags != 0\nStruct @%p, type %d m_Flag %X" ),
...
@@ -116,19 +116,13 @@ m_Flags != 0\nStruct @%p, type %d m_Flag %X" ),
break
;
break
;
case
ID_MODEDIT_DELETE_ITEM_BUTT
:
case
ID_MODEDIT_DELETE_ITEM_BUTT
:
if
(
DrawStruct
==
NULL
||
// No item to delete
// Item in edit, cannot delete it
(
DrawStruct
->
m_Flags
!=
0
)
)
// Item in edit, cannot delete it
if
(
DrawStruct
&&
(
DrawStruct
->
m_Flags
!=
0
)
)
break
;
DrawStruct
=
ModeditLocateAndDisplay
();
if
(
DrawStruct
==
NULL
||
(
DrawStruct
->
m_Flags
!=
0
)
)
break
;
break
;
if
(
DrawStruct
->
Type
()
!=
TYPE_MODULE
)
//
GetBoard()->m_Modules )
if
(
DrawStruct
->
Type
()
!=
TYPE_MODULE
)
//
Cannot delete the module itself
{
{
// Cannot delete the module itself
SaveCopyInUndoList
(
GetBoard
()
->
m_Modules
,
UR_MODEDIT
);
SaveCopyInUndoList
(
GetBoard
()
->
m_Modules
,
UR_MODEDIT
);
RemoveStruct
(
DrawStruct
);
RemoveStruct
(
DrawStruct
);
DrawStruct
=
NULL
;
SetCurItem
(
NULL
);
SetCurItem
(
NULL
);
}
}
break
;
break
;
...
...
pcbnew/move-drag_pads.cpp
View file @
f6962b62
...
@@ -227,30 +227,36 @@ void WinEDA_BasePcbFrame::AddPad( MODULE* Module, bool draw )
...
@@ -227,30 +227,36 @@ void WinEDA_BasePcbFrame::AddPad( MODULE* Module, bool draw )
}
}
/* Function to delete the pad. */
/** Function DeletePad
void
WinEDA_BasePcbFrame
::
DeletePad
(
D_PAD
*
Pad
)
* Delete the pad aPad.
* Refresh the modified screen area
* Refresh modified parameters of the parent module (bounding box, last date)
* @param aPad = the pad to delete
* @param aQuery = true to promt for confirmation, false to delete silently
*/
void
WinEDA_BasePcbFrame
::
DeletePad
(
D_PAD
*
aPad
,
bool
aQuery
)
{
{
MODULE
*
Module
;
MODULE
*
Module
;
wxString
line
;
if
(
Pad
==
NULL
)
if
(
a
Pad
==
NULL
)
return
;
return
;
Module
=
(
MODULE
*
)
Pad
->
GetParent
();
Module
=
(
MODULE
*
)
a
Pad
->
GetParent
();
Module
->
m_LastEdit_Time
=
time
(
NULL
);
Module
->
m_LastEdit_Time
=
time
(
NULL
);
line
.
Printf
(
_
(
"Delete Pad (module %s %s) "
),
if
(
aQuery
)
{
wxString
msg
;
msg
.
Printf
(
_
(
"Delete Pad (module %s %s) "
),
GetChars
(
Module
->
m_Reference
->
m_Text
),
GetChars
(
Module
->
m_Reference
->
m_Text
),
GetChars
(
Module
->
m_Value
->
m_Text
)
);
GetChars
(
Module
->
m_Value
->
m_Text
)
);
if
(
!
IsOK
(
this
,
line
)
)
if
(
!
IsOK
(
this
,
msg
)
)
return
;
return
;
}
m_Pcb
->
m_Status_Pcb
=
0
;
m_Pcb
->
m_Status_Pcb
=
0
;
aPad
->
DeleteStructure
();
Pad
->
DeleteStructure
();
DrawPanel
->
PostDirtyRect
(
Module
->
GetBoundingBox
()
);
DrawPanel
->
PostDirtyRect
(
Module
->
GetBoundingBox
()
);
Module
->
Set_Rectangle_Encadrement
();
Module
->
Set_Rectangle_Encadrement
();
OnModify
();
OnModify
();
...
...
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