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
a0fb4ed0
Commit
a0fb4ed0
authored
Apr 04, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bruteforce module update after a netlist reload.
parent
a6917280
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
wxPcbStruct.h
include/wxPcbStruct.h
+1
-1
netlist.cpp
pcbnew/netlist.cpp
+20
-0
No files found.
include/wxPcbStruct.h
View file @
a0fb4ed0
...
@@ -1475,7 +1475,7 @@ public:
...
@@ -1475,7 +1475,7 @@ public:
/**
/**
* Function ReadPcbNetlist
* Function ReadPcbNetlist
* reads \a aNetlistFileName and
p
pdates the footprints (load missing footprints and
* reads \a aNetlistFileName and
u
pdates the footprints (load missing footprints and
* delete on demand extra footprints) on the board.
* delete on demand extra footprints) on the board.
* Update connectivity info, references, values and "TIME STAMP"
* Update connectivity info, references, values and "TIME STAMP"
*
*
...
...
pcbnew/netlist.cpp
View file @
a0fb4ed0
...
@@ -27,9 +27,11 @@
...
@@ -27,9 +27,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#include <boost/bind.hpp>
#include <fctsys.h>
#include <fctsys.h>
#include <pgm_base.h>
#include <pgm_base.h>
#include <class_drawpanel.h>
#include <class_drawpanel.h>
#include <class_draw_panel_gal.h>
#include <confirm.h>
#include <confirm.h>
#include <dialog_helpers.h>
#include <dialog_helpers.h>
#include <wxPcbStruct.h>
#include <wxPcbStruct.h>
...
@@ -59,6 +61,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
...
@@ -59,6 +61,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
wxString
msg
;
wxString
msg
;
NETLIST
netlist
;
NETLIST
netlist
;
NETLIST_READER
*
netlistReader
;
NETLIST_READER
*
netlistReader
;
KIGFX
::
VIEW
*
view
=
GetGalCanvas
()
->
GetView
();
netlist
.
SetIsDryRun
(
aIsDryRun
);
netlist
.
SetIsDryRun
(
aIsDryRun
);
netlist
.
SetFindByTimeStamp
(
aSelectByTimeStamp
);
netlist
.
SetFindByTimeStamp
(
aSelectByTimeStamp
);
...
@@ -93,6 +96,16 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
...
@@ -93,6 +96,16 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
if
(
!
netlist
.
IsDryRun
()
)
if
(
!
netlist
.
IsDryRun
()
)
GetScreen
()
->
ClearUndoRedoList
();
GetScreen
()
->
ClearUndoRedoList
();
if
(
!
netlist
.
IsDryRun
()
)
{
// Remove old modules
for
(
MODULE
*
module
=
GetBoard
()
->
m_Modules
;
module
;
module
=
module
->
Next
()
)
{
module
->
RunOnChildren
(
boost
::
bind
(
&
KIGFX
::
VIEW
::
Remove
,
view
,
_1
)
);
view
->
Remove
(
module
);
}
}
netlist
.
SortByReference
();
netlist
.
SortByReference
();
GetBoard
()
->
ReplaceNetlist
(
netlist
,
aDeleteSinglePadNets
,
aReporter
);
GetBoard
()
->
ReplaceNetlist
(
netlist
,
aDeleteSinglePadNets
,
aReporter
);
...
@@ -104,6 +117,13 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
...
@@ -104,6 +117,13 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
SetCurItem
(
NULL
);
SetCurItem
(
NULL
);
// Reload modules
for
(
MODULE
*
module
=
GetBoard
()
->
m_Modules
;
module
;
module
=
module
->
Next
()
)
{
module
->
RunOnChildren
(
boost
::
bind
(
&
KIGFX
::
VIEW
::
Add
,
view
,
_1
)
);
GetGalCanvas
()
->
GetView
()
->
Add
(
module
);
}
if
(
aDeleteUnconnectedTracks
&&
GetBoard
()
->
m_Track
)
if
(
aDeleteUnconnectedTracks
&&
GetBoard
()
->
m_Track
)
{
{
// Remove erroneous tracks. This should probably pushed down to the #BOARD object.
// Remove erroneous tracks. This should probably pushed down to the #BOARD object.
...
...
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