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
4da839f3
Commit
4da839f3
authored
Feb 18, 2015
by
Tomasz Włostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
groundwork for invoking module editor on selected footprint in GAL mode
parent
da9fc844
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
loadcmp.cpp
pcbnew/loadcmp.cpp
+9
-2
modedit.cpp
pcbnew/modedit.cpp
+4
-0
xchgmod.cpp
pcbnew/xchgmod.cpp
+6
-0
No files found.
pcbnew/loadcmp.cpp
View file @
4da839f3
...
...
@@ -28,6 +28,8 @@
* @brief Footprints selection and loading functions.
*/
#include <boost/bind.hpp>
#include <fctsys.h>
#include <class_drawpanel.h>
#include <pcb_draw_panel_gal.h>
...
...
@@ -61,6 +63,10 @@ static void DisplayCmpDoc( wxString& aName, void* aData );
static
FOOTPRINT_LIST
MList
;
static
void
clearModuleItemFlags
(
BOARD_ITEM
*
aItem
)
{
aItem
->
ClearFlags
();
}
bool
FOOTPRINT_EDIT_FRAME
::
Load_Module_From_BOARD
(
MODULE
*
aModule
)
{
...
...
@@ -92,9 +98,10 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule )
aModule
=
newModule
;
GetBoard
()
->
Add
(
newModule
);
newModule
->
ClearFlags
();
newModule
->
RunOnChildren
(
boost
::
bind
(
&
clearModuleItemFlags
,
_1
)
);
GetBoard
()
->
Add
(
newModule
);
// Clear references to any net info, because the footprint editor
// does know any thing about nets handled by the current edited board.
...
...
pcbnew/modedit.cpp
View file @
4da839f3
...
...
@@ -53,6 +53,7 @@
#include <modview_frame.h>
#include <collectors.h>
#include <tool/tool_manager.h>
#include <tools/common_actions.h>
#include <dialog_edit_module_for_Modedit.h>
#include <wildcards_and_files_ext.h>
...
...
@@ -428,6 +429,8 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
break
;
}
m_toolManager
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
// Create the "new" module
MODULE
*
newmodule
=
new
MODULE
(
*
module_in_edit
);
newmodule
->
SetParent
(
mainpcb
);
...
...
@@ -480,6 +483,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
RN_DATA
*
ratsnest
=
pcbframe
->
GetBoard
()
->
GetRatsnest
();
ratsnest
->
Update
(
newmodule
);
ratsnest
->
Recalculate
();
GetGalCanvas
()
->
ForceRefresh
();
}
}
break
;
...
...
pcbnew/xchgmod.cpp
View file @
4da839f3
...
...
@@ -45,6 +45,8 @@
#include <wildcards_and_files_ext.h>
#include <boost/bind.hpp>
#include <tool/tool_manager.h>
#include <tools/common_actions.h>
static
bool
RecreateCmpFile
(
BOARD
*
aBrd
,
const
wxString
&
aFullCmpFileName
);
...
...
@@ -481,6 +483,10 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aOldModule,
aNewModule
->
RunOnChildren
(
boost
::
bind
(
&
KIGFX
::
VIEW
::
Add
,
view
,
_1
)
);
view
->
Add
(
aNewModule
);
m_toolManager
->
RunAction
(
COMMON_ACTIONS
::
selectionClear
,
true
);
GetGalCanvas
()
->
ForceRefresh
();
}
}
else
...
...
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