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
14cfd173
Commit
14cfd173
authored
Jul 09, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the Module viewer crash when there is no footprint loaded.
parent
78853feb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
cairo_compositor.cpp
common/gal/cairo/cairo_compositor.cpp
+3
-0
modview_frame.cpp
pcbnew/modview_frame.cpp
+6
-4
No files found.
common/gal/cairo/cairo_compositor.cpp
View file @
14cfd173
...
@@ -55,6 +55,9 @@ void CAIRO_COMPOSITOR::Resize( unsigned int aWidth, unsigned int aHeight )
...
@@ -55,6 +55,9 @@ void CAIRO_COMPOSITOR::Resize( unsigned int aWidth, unsigned int aHeight )
{
{
clean
();
clean
();
assert
(
m_width
>
0
);
assert
(
m_height
>
0
);
m_width
=
aWidth
;
m_width
=
aWidth
;
m_height
=
aHeight
;
m_height
=
aHeight
;
...
...
pcbnew/modview_frame.cpp
View file @
14cfd173
...
@@ -168,11 +168,11 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
...
@@ -168,11 +168,11 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
ReCreateLibraryList
();
ReCreateLibraryList
();
UpdateTitle
();
UpdateTitle
();
EDA_DRAW_FRAME
*
drawFrame
=
static_cast
<
EDA_DRAW_FRAME
*>
(
aParent
);
PCB_BASE_FRAME
*
parentFrame
=
static_cast
<
PCB_BASE_FRAME
*>
(
Kiway
().
Player
(
FRAME_PCB
,
true
)
);
// Create GAL canvas
// Create GAL canvas
PCB_DRAW_PANEL_GAL
*
drawPanel
=
new
PCB_DRAW_PANEL_GAL
(
this
,
-
1
,
wxPoint
(
0
,
0
),
m_FrameSize
,
PCB_DRAW_PANEL_GAL
*
drawPanel
=
new
PCB_DRAW_PANEL_GAL
(
this
,
-
1
,
wxPoint
(
0
,
0
),
m_FrameSize
,
draw
Frame
->
GetGalCanvas
()
->
GetBackend
()
);
parent
Frame
->
GetGalCanvas
()
->
GetBackend
()
);
SetGalCanvas
(
drawPanel
);
SetGalCanvas
(
drawPanel
);
// Create the manager and dispatcher & route draw panel events to the dispatcher
// Create the manager and dispatcher & route draw panel events to the dispatcher
...
@@ -193,9 +193,11 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
...
@@ -193,9 +193,11 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
id
.
SetLibNickname
(
getCurNickname
()
);
id
.
SetLibNickname
(
getCurNickname
()
);
id
.
SetFootprintName
(
getCurFootprintName
()
);
id
.
SetFootprintName
(
getCurFootprintName
()
);
GetBoard
()
->
Add
(
loadFootprint
(
id
)
);
GetBoard
()
->
Add
(
loadFootprint
(
id
)
);
drawPanel
->
DisplayBoard
(
m_Pcb
);
}
}
drawPanel
->
DisplayBoard
(
m_Pcb
);
updateView
();
if
(
m_canvas
)
if
(
m_canvas
)
m_canvas
->
SetAcceleratorTable
(
table
);
m_canvas
->
SetAcceleratorTable
(
table
);
...
@@ -273,7 +275,7 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
...
@@ -273,7 +275,7 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
Show
(
true
);
Show
(
true
);
UseGalCanvas
(
draw
Frame
->
IsGalCanvasActive
()
);
UseGalCanvas
(
parent
Frame
->
IsGalCanvasActive
()
);
}
}
...
...
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