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
876bf75d
Commit
876bf75d
authored
Jun 18, 2013
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added GAL_TYPE_NONE as an indicator of GAL uninitialized state.
parent
e7b7e0e6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
drawpanel_gal.cpp
common/drawpanel_gal.cpp
+8
-5
class_drawpanel_gal.h
include/class_drawpanel_gal.h
+1
-0
No files found.
common/drawpanel_gal.cpp
View file @
876bf75d
...
...
@@ -52,6 +52,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
wxWindow
(
aParentWindow
,
aWindowId
,
aPosition
,
aSize
)
{
m_gal
=
NULL
;
m_currentGal
=
GAL_TYPE_NONE
;
m_view
=
NULL
;
m_painter
=
NULL
;
...
...
@@ -158,7 +159,6 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders )
if
(
aGalType
==
m_currentGal
&&
aUseShaders
==
m_useShaders
&&
m_gal
!=
NULL
)
return
;
if
(
m_gal
)
delete
m_gal
;
switch
(
aGalType
)
...
...
@@ -171,6 +171,9 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders )
case
GAL_TYPE_CAIRO
:
m_gal
=
new
KiGfx
::
CAIRO_GAL
(
this
,
this
,
this
);
break
;
case
GAL_TYPE_NONE
:
return
;
}
m_gal
->
SetWorldUnitLength
(
1.0
/
METRIC_UNIT_LENGTH
*
2.54
);
// 1 inch in nanometers
...
...
include/class_drawpanel_gal.h
View file @
876bf75d
...
...
@@ -50,6 +50,7 @@ class EDA_DRAW_PANEL_GAL : public wxWindow
{
public
:
enum
GalType
{
GAL_TYPE_NONE
,
///< Not used
GAL_TYPE_OPENGL
,
///< OpenGL implementation
GAL_TYPE_CAIRO
,
///< Cairo implementation
};
...
...
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