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
9305f77f
Commit
9305f77f
authored
Jun 05, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed: Modules become invisible after reloading a netlist, until GAL view is refreshed.
parent
517bfa35
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
class_module.h
pcbnew/class_module.h
+1
-1
netlist.cpp
pcbnew/netlist.cpp
+8
-6
No files found.
pcbnew/class_module.h
View file @
9305f77f
...
@@ -463,7 +463,7 @@ public:
...
@@ -463,7 +463,7 @@ public:
void
RunOnChildren
(
boost
::
function
<
void
(
BOARD_ITEM
*
)
>
aFunction
);
void
RunOnChildren
(
boost
::
function
<
void
(
BOARD_ITEM
*
)
>
aFunction
);
/// @copydoc VIEW_ITEM::ViewUpdate()
/// @copydoc VIEW_ITEM::ViewUpdate()
void
ViewUpdate
(
int
aUpdateFlags
);
void
ViewUpdate
(
int
aUpdateFlags
=
KIGFX
::
VIEW_ITEM
::
ALL
);
/**
/**
* Function CopyNetlistSettings
* Function CopyNetlistSettings
...
...
pcbnew/netlist.cpp
View file @
9305f77f
...
@@ -63,6 +63,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
...
@@ -63,6 +63,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
NETLIST
netlist
;
NETLIST
netlist
;
NETLIST_READER
*
netlistReader
;
NETLIST_READER
*
netlistReader
;
KIGFX
::
VIEW
*
view
=
GetGalCanvas
()
->
GetView
();
KIGFX
::
VIEW
*
view
=
GetGalCanvas
()
->
GetView
();
BOARD
*
board
=
GetBoard
();
netlist
.
SetIsDryRun
(
aIsDryRun
);
netlist
.
SetIsDryRun
(
aIsDryRun
);
netlist
.
SetFindByTimeStamp
(
aSelectByTimeStamp
);
netlist
.
SetFindByTimeStamp
(
aSelectByTimeStamp
);
...
@@ -100,7 +101,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
...
@@ -100,7 +101,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
if
(
!
netlist
.
IsDryRun
()
)
if
(
!
netlist
.
IsDryRun
()
)
{
{
// Remove old modules
// Remove old modules
for
(
MODULE
*
module
=
GetBoard
()
->
m_Modules
;
module
;
module
=
module
->
Next
()
)
for
(
MODULE
*
module
=
board
->
m_Modules
;
module
;
module
=
module
->
Next
()
)
{
{
module
->
RunOnChildren
(
boost
::
bind
(
&
KIGFX
::
VIEW
::
Remove
,
view
,
_1
)
);
module
->
RunOnChildren
(
boost
::
bind
(
&
KIGFX
::
VIEW
::
Remove
,
view
,
_1
)
);
view
->
Remove
(
module
);
view
->
Remove
(
module
);
...
@@ -108,7 +109,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
...
@@ -108,7 +109,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
}
}
netlist
.
SortByReference
();
netlist
.
SortByReference
();
GetBoard
()
->
ReplaceNetlist
(
netlist
,
aDeleteSinglePadNets
,
aReporter
);
board
->
ReplaceNetlist
(
netlist
,
aDeleteSinglePadNets
,
aReporter
);
// If it was a dry run, nothing has changed so we're done.
// If it was a dry run, nothing has changed so we're done.
if
(
netlist
.
IsDryRun
()
)
if
(
netlist
.
IsDryRun
()
)
...
@@ -119,13 +120,14 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
...
@@ -119,13 +120,14 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
SetCurItem
(
NULL
);
SetCurItem
(
NULL
);
// Reload modules
// Reload modules
for
(
MODULE
*
module
=
GetBoard
()
->
m_Modules
;
module
;
module
=
module
->
Next
()
)
for
(
MODULE
*
module
=
board
->
m_Modules
;
module
;
module
=
module
->
Next
()
)
{
{
module
->
RunOnChildren
(
boost
::
bind
(
&
KIGFX
::
VIEW
::
Add
,
view
,
_1
)
);
module
->
RunOnChildren
(
boost
::
bind
(
&
KIGFX
::
VIEW
::
Add
,
view
,
_1
)
);
view
->
Add
(
module
);
view
->
Add
(
module
);
module
->
ViewUpdate
();
}
}
if
(
aDeleteUnconnectedTracks
&&
GetBoard
()
->
m_Track
)
if
(
aDeleteUnconnectedTracks
&&
board
->
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.
RemoveMisConnectedTracks
();
RemoveMisConnectedTracks
();
...
@@ -133,11 +135,11 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
...
@@ -133,11 +135,11 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName,
// Rebuild the board connectivity:
// Rebuild the board connectivity:
if
(
IsGalCanvasActive
()
)
if
(
IsGalCanvasActive
()
)
GetBoard
()
->
GetRatsnest
()
->
Recalculate
();
board
->
GetRatsnest
()
->
ProcessBoard
();
else
else
Compile_Ratsnest
(
NULL
,
true
);
Compile_Ratsnest
(
NULL
,
true
);
SetMsgPanel
(
GetBoard
()
);
SetMsgPanel
(
board
);
m_canvas
->
Refresh
();
m_canvas
->
Refresh
();
}
}
...
...
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