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
927d11f7
Commit
927d11f7
authored
Sep 30, 2014
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eeschema: fix Bug #1375581 (libraries setup empty after clicking "print" icon)
parent
d4731da0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
schframe.cpp
eeschema/schframe.cpp
+2
-1
units.i
pcbnew/scripting/units.i
+14
-15
No files found.
eeschema/schframe.cpp
View file @
927d11f7
...
@@ -1053,7 +1053,8 @@ void SCH_EDIT_FRAME::OnPrint( wxCommandEvent& event )
...
@@ -1053,7 +1053,8 @@ void SCH_EDIT_FRAME::OnPrint( wxCommandEvent& event )
if
(
fn
.
GetName
()
!=
NAMELESS_PROJECT
)
if
(
fn
.
GetName
()
!=
NAMELESS_PROJECT
)
{
{
// was: wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParametersList() );
// was: wxGetApp().WriteProjectConfig( fn.GetFullPath(), GROUP, GetProjectFileParametersList() );
Prj
().
ConfigSave
(
Kiface
().
KifaceSearch
(),
GROUP_SCH
,
GetProjectFileParametersList
()
);
Prj
().
ConfigSave
(
Kiface
().
KifaceSearch
(),
GROUP_SCH_EDITOR
,
GetProjectFileParametersList
()
);
}
}
}
}
...
...
pcbnew/scripting/units.i
View file @
927d11f7
...
@@ -27,53 +27,52 @@
...
@@ -27,53 +27,52 @@
* @brief unit conversion code
* @brief unit conversion code
*/
*/
// Unit conversion, must be conditionally adapter to the new
// Unit conversion, between internal
// nanometer mode that will be soon included in pcbnew
%pythoncode
%pythoncode
{
{
def ToMM(iu):
def ToMM(iu):
if type(iu) in [int,float]:
if type(iu) in [int,float]:
return float(iu) / float(IU_PER_MM)
return float(iu) / float(IU_PER_MM)
elif type(iu) in [wxPoint,wxSize]:
elif type(iu) in [wxPoint,wxSize]:
return tuple(map(ToMM,iu))
return tuple(map(ToMM,iu))
def FromMM(mm):
def FromMM(mm):
if type(mm) in [int,float]:
if type(mm) in [int,float]:
return int(float(mm) * float(IU_PER_MM))
return int(float(mm) * float(IU_PER_MM))
elif type(mm) in [wxPoint,wxSize]:
elif type(mm) in [wxPoint,wxSize]:
return tuple(map(FromMM,mm))
return tuple(map(FromMM,mm))
def ToMils(iu):
def ToMils(iu):
if type(iu) in [int,float]:
if type(iu) in [int,float]:
return float(iu) / float(IU_PER_MILS)
return float(iu) / float(IU_PER_MILS)
elif type(iu) in [wxPoint,wxSize]:
elif type(iu) in [wxPoint,wxSize]:
return tuple(map(ToMils,iu))
return tuple(map(ToMils,iu))
def FromMils(mils):
def FromMils(mils):
if type(mils) in [int,float]:
if type(mils) in [int,float]:
return int(float(mils)*float(IU_PER_MILS))
return int(float(mils)*float(IU_PER_MILS))
elif type(mils) in [wxPoint,wxSize]:
elif type(mils) in [wxPoint,wxSize]:
return tuple(map(FromMils,mils))
return tuple(map(FromMils,mils))
def wxSizeMM(mmx,mmy): return wxSize(FromMM(mmx),FromMM(mmy))
def wxSizeMM(mmx,mmy): return wxSize(FromMM(mmx),FromMM(mmy))
def wxSizeMils(mmx,mmy): return wxSize(FromMils(mmx),FromMils(mmy))
def wxSizeMils(mmx,mmy): return wxSize(FromMils(mmx),FromMils(mmy))
def wxPointMM(mmx,mmy): return wxPoint(FromMM(mmx),FromMM(mmy))
def wxPointMM(mmx,mmy): return wxPoint(FromMM(mmx),FromMM(mmy))
def wxPointMils(mmx,mmy): return wxPoint(FromMils(mmx),FromMils(mmy))
def wxPointMils(mmx,mmy): return wxPoint(FromMils(mmx),FromMils(mmy))
def wxRectMM(x,y,wx,wy):
def wxRectMM(x,y,wx,wy):
x = int(FromMM(x))
x = int(FromMM(x))
y = int(FromMM(y))
y = int(FromMM(y))
wx = int(FromMM(wx))
wx = int(FromMM(wx))
wy = int (FromMM(wy))
wy = int (FromMM(wy))
return wxRect(x,y,wx,wy)
return wxRect(x,y,wx,wy)
def wxRectMils(x,y,wx,wy):
def wxRectMils(x,y,wx,wy):
x = int(FromMils(x))
x = int(FromMils(x))
y = int(FromMils(y))
y = int(FromMils(y))
wx = int(FromMils(wx))
wx = int(FromMils(wx))
wy = int (FromMils(wy))
wy = int (FromMils(wy))
return wxRect(x,y,wx,wy)
return wxRect(x,y,wx,wy)
}
}
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