Commit c3c50d55 authored by Maxime Perrotin's avatar Maxime Perrotin

Use default value in GUI if set in ASN1

parent 7d4e4124
......@@ -34,6 +34,7 @@ LICENSE: LGPL - see LICENSE file
CHANGELOG:
1.6.5 - GUI can display default values if set in ASN.1 models
1.6.4 - Fix printing help with --help
1.6.3 - Fix PI import names in opengeode 2.x.x simulator
1.6.2 - Use mono prefix to call msc2py.exe
......
......@@ -16,7 +16,7 @@
__author__ = "Maxime Perrotin"
__license__ = "LGPLv3"
__version__ = "1.6.4"
__version__ = "1.6.5"
__url__ = "http://taste.tuxfamily.org"
import sys
......@@ -249,6 +249,10 @@ class asn1Editor(QTreeView):
# Create an instance of the ASN.1 type using the backend
self.asn1Instance = self.backend.typeInstance()
def setDefaultValue(self):
# Update the value to get default values if set in ASN1
self.updateVariable()
def hideExtraColumns(self):
''' Hide the columns containing the type and constraint '''
self.setColumnHidden(1, True)
......
......@@ -429,6 +429,7 @@ def gui():
if isinstance(editor, asn1Viewer): # TM Viewer
hasTM = True
editor.setAsn1Model(datamodel.tm[editor.objectName()])
editor.setDefaultValue()
g_tmPool[encoder_backend.tmId] = editor
editor.setPlotterBackend(plotter)
# Connect the plot_refresh signal from editors to the plot manager
......@@ -461,6 +462,7 @@ def gui():
button.hide()
else: # TC Editor
editor.setAsn1Model(datamodel.tc[editor.objectName()])
editor.setDefaultValue()
if not msgQ:
encoder_backend.udpController = udp
for button in myButtons:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment