Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
asn1-value-editor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
TASTE
asn1-value-editor
Commits
aed1c704
Commit
aed1c704
authored
Oct 31, 2017
by
Maxime Perrotin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix checks for type case
parent
222c849f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
asn1_value_editor/standalone_editor.py
asn1_value_editor/standalone_editor.py
+10
-2
No files found.
asn1_value_editor/standalone_editor.py
View file @
aed1c704
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
This version needs ASN.1 version 3.x.x
This version needs ASN.1 version 3.x.x
Copyright (c) 2012-201
5
European Space Agency
Copyright (c) 2012-201
7
European Space Agency
Designed and implemented by Maxime Perrotin
Designed and implemented by Maxime Perrotin
...
@@ -242,7 +242,14 @@ class SingleValueEditor(QObject):
...
@@ -242,7 +242,14 @@ class SingleValueEditor(QObject):
self
.
widgets
[
name
]
=
{
'widget'
:
loader
.
load
(
uiFile
)}
self
.
widgets
[
name
]
=
{
'widget'
:
loader
.
load
(
uiFile
)}
uiFile
.
close
()
uiFile
.
close
()
widget
=
self
.
widgets
[
name
][
'widget'
]
widget
=
self
.
widgets
[
name
][
'widget'
]
pyType
=
self
.
tc
[
name
.
replace
(
'_'
,
'-'
)]
for
tc
in
self
.
tc
.
iterkeys
():
if
tc
.
lower
().
replace
(
'_'
,
'-'
)
==
name
.
lower
().
replace
(
'_'
,
'-'
):
tcNameWithCase
=
tc
break
else
:
raise
TypeError
(
"No type named {} is defined in the ASN.1 model"
.
format
(
name
))
pyType
=
self
.
tc
[
tcNameWithCase
]
self
.
widgets
[
name
][
'editor'
]
=
widget
.
findChild
(
asn1Editor
,
'ASN1EDITOR'
)
self
.
widgets
[
name
][
'editor'
]
=
widget
.
findChild
(
asn1Editor
,
'ASN1EDITOR'
)
self
.
widgets
[
name
][
'editor'
].
log
=
logger
self
.
widgets
[
name
][
'editor'
].
log
=
logger
okButton
=
widget
.
findChild
(
QToolButton
,
'okButton'
)
okButton
=
widget
.
findChild
(
QToolButton
,
'okButton'
)
...
@@ -266,6 +273,7 @@ class SingleValueEditor(QObject):
...
@@ -266,6 +273,7 @@ class SingleValueEditor(QObject):
widget
=
self
.
widgets
[
param
]
widget
=
self
.
widgets
[
param
]
# Create a ctypes instance of the variable and set it to the editor
# Create a ctypes instance of the variable and set it to the editor
# print dir(self.asn1ctypes), self.asn1ctypes.__file__
instance
=
getattr
(
self
.
asn1ctypes
,
asnType
.
replace
(
'-'
,
'_'
))()
instance
=
getattr
(
self
.
asn1ctypes
,
asnType
.
replace
(
'-'
,
'_'
))()
widget
[
'editor'
].
asn1Instance
=
instance
widget
[
'editor'
].
asn1Instance
=
instance
logger
.
info
(
'Created instance of '
+
asnType
)
logger
.
info
(
'Created instance of '
+
asnType
)
...
...
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