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
1f7ce541
Commit
1f7ce541
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Next/previous footprint toolbar buttons are handled in the Module Viewer using GAL canvas.
parent
553996e7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
15 deletions
+23
-15
modview_frame.cpp
pcbnew/modview_frame.cpp
+20
-13
modview_frame.h
pcbnew/modview_frame.h
+3
-2
No files found.
pcbnew/modview_frame.cpp
View file @
1f7ce541
...
...
@@ -356,6 +356,15 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList()
}
void
FOOTPRINT_VIEWER_FRAME
::
UseGalCanvas
(
bool
aEnable
)
{
EDA_DRAW_FRAME
::
UseGalCanvas
(
aEnable
);
if
(
aEnable
)
GetGalCanvas
()
->
StartDrawing
();
}
void
FOOTPRINT_VIEWER_FRAME
::
ReCreateFootprintList
()
{
m_footprintList
->
Clear
();
...
...
@@ -455,15 +464,7 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event )
UpdateTitle
();
if
(
IsGalCanvasActive
()
)
{
static_cast
<
PCB_DRAW_PANEL_GAL
*>
(
GetGalCanvas
()
)
->
DisplayBoard
(
m_Pcb
);
// Autozoom
m_Pcb
->
ComputeBoundingBox
(
false
);
EDA_RECT
boardBbox
=
m_Pcb
->
GetBoundingBox
();
GetGalCanvas
()
->
GetView
()
->
SetViewport
(
BOX2D
(
boardBbox
.
GetOrigin
(),
boardBbox
.
GetSize
()
)
);
}
redrawGal
();
Zoom_Automatique
(
false
);
m_canvas
->
Refresh
();
...
...
@@ -846,8 +847,12 @@ void FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint( int aMode )
GetBoard
()
->
Add
(
footprint
,
ADD_APPEND
);
Update3D_Frame
();
if
(
IsGalCanvasActive
()
)
redrawGal
();
}
UpdateTitle
();
Zoom_Automatique
(
false
);
m_canvas
->
Refresh
();
...
...
@@ -873,10 +878,12 @@ void FOOTPRINT_VIEWER_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
}
void
FOOTPRINT_VIEWER_FRAME
::
UseGalCanvas
(
bool
aEnable
)
void
FOOTPRINT_VIEWER_FRAME
::
redrawGal
(
)
{
EDA_DRAW_FRAME
::
UseGalCanvas
(
aEnable
);
static_cast
<
PCB_DRAW_PANEL_GAL
*>
(
GetGalCanvas
()
)
->
DisplayBoard
(
m_Pcb
);
if
(
aEnable
)
GetGalCanvas
()
->
StartDrawing
();
// Autozoom
m_Pcb
->
ComputeBoundingBox
(
false
);
EDA_RECT
boardBbox
=
m_Pcb
->
GetBoundingBox
();
GetGalCanvas
()
->
GetView
()
->
SetViewport
(
BOX2D
(
boardBbox
.
GetOrigin
(),
boardBbox
.
GetSize
()
)
);
}
pcbnew/modview_frame.h
View file @
1f7ce541
...
...
@@ -69,6 +69,8 @@ public:
*/
void
ReCreateLibraryList
();
///> @copydoc EDA_DRAW_FRAME::UseGalCanvas()
virtual
void
UseGalCanvas
(
bool
aEnable
);
private
:
...
...
@@ -170,8 +172,7 @@ private:
void
SaveCopyInUndoList
(
BOARD_ITEM
*
,
UNDO_REDO_T
,
const
wxPoint
&
)
{}
void
SaveCopyInUndoList
(
const
PICKED_ITEMS_LIST
&
,
UNDO_REDO_T
,
const
wxPoint
&
)
{}
///> @copydoc EDA_DRAW_FRAME::UseGalCanvas()
virtual
void
UseGalCanvas
(
bool
aEnable
);
void
redrawGal
();
DECLARE_EVENT_TABLE
()
};
...
...
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