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
8059f4dd
Commit
8059f4dd
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added autozooming and display of the last chosen module for module viewer using GAL.
parent
13e67e1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
modview_frame.cpp
pcbnew/modview_frame.cpp
+7
-15
No files found.
pcbnew/modview_frame.cpp
View file @
8059f4dd
...
...
@@ -151,7 +151,6 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
SetGalCanvas
(
drawPanel
);
SetBoard
(
new
BOARD
()
);
drawPanel
->
DisplayBoard
(
m_Pcb
);
// Ensure all layers and items are visible:
GetBoard
()
->
SetVisibleAlls
();
...
...
@@ -178,6 +177,7 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
id
.
SetLibNickname
(
getCurNickname
()
);
id
.
SetFootprintName
(
getCurFootprintName
()
);
GetBoard
()
->
Add
(
loadFootprint
(
id
)
);
drawPanel
->
DisplayBoard
(
m_Pcb
);
}
if
(
m_canvas
)
...
...
@@ -438,17 +438,13 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event )
if
(
IsGalCanvasActive
()
)
{
KIGFX
::
VIEW
*
view
=
GetGalCanvas
()
->
GetView
();
view
->
Clear
();
static_cast
<
PCB_DRAW_PANEL_GAL
*>
(
GetGalCanvas
()
)
->
DisplayBoard
(
m_Pcb
);
// Load modules and its additional elements
for
(
MODULE
*
module
=
GetBoard
()
->
m_Modules
;
module
;
module
=
module
->
Next
()
)
{
module
->
RunOnChildren
(
boost
::
bind
(
&
KIGFX
::
VIEW
::
Add
,
view
,
_1
)
);
view
->
Add
(
module
);
}
// view->Add( loadFootprint( id ) );
// Autozoom
m_Pcb
->
ComputeBoundingBox
(
false
);
EDA_RECT
boardBbox
=
m_Pcb
->
GetBoundingBox
();
GetGalCanvas
()
->
GetView
()
->
SetViewport
(
BOX2D
(
boardBbox
.
GetOrigin
(),
boardBbox
.
GetSize
()
)
);
}
Zoom_Automatique
(
false
);
...
...
@@ -864,9 +860,5 @@ void FOOTPRINT_VIEWER_FRAME::UseGalCanvas( bool aEnable )
EDA_DRAW_FRAME
::
UseGalCanvas
(
aEnable
);
if
(
aEnable
)
{
SetBoard
(
m_Pcb
);
GetGalCanvas
()
->
StartDrawing
();
}
}
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