Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.editor
Commits
8cb44c9d
Commit
8cb44c9d
authored
Jun 02, 2020
by
Samuel GAIST
Browse files
[widgets][toolchaineditor] Use instance of ExperimentResource and implement refresh
parent
c620eef3
Changes
1
Hide whitespace changes
Inline
Side-by-side
beat/editor/widgets/toolchaineditor.py
View file @
8cb44c9d
...
...
@@ -71,6 +71,7 @@ from ..backend.asset import AssetType
from
..backend.assetmodel
import
AssetModel
from
..backend.resourcemodels
import
AlgorithmResourceModel
from
..backend.resourcemodels
import
DatasetResourceModel
from
..backend.resourcemodels
import
experiment_resources
from
..decorators
import
frozen
from
.editor
import
AbstractAssetEditor
from
.toolchainscene
import
ToolchainScene
...
...
@@ -1854,10 +1855,13 @@ class ToolchainEditor(AbstractAssetEditor):
self
.
autonomous_loop_evaluator_list
=
[]
self
.
toolchain
.
dataChanged
.
connect
(
self
.
dataChanged
)
self
.
contextChanged
.
connect
(
self
.
__
onContextChanged
)
self
.
contextChanged
.
connect
(
self
.
__
reloadData
)
@
pyqtSlot
()
def
__onContextChanged
(
self
):
def
__reloadData
(
self
):
# ensure the experiments related data are up to date
experiment_resources
.
refresh
()
algorithm_model
=
AlgorithmResourceModel
()
algorithm_model
.
setAnalyzerEnabled
(
False
)
algorithm_model
.
setTypes
([
Algorithm
.
SEQUENTIAL
,
Algorithm
.
AUTONOMOUS
])
...
...
@@ -1913,6 +1917,17 @@ class ToolchainEditor(AbstractAssetEditor):
self
.
analyzer_list
,
)
def
refresh
(
self
):
"""Reimpl"""
super
().
refresh
()
self
.
__reloadData
()
def
_asset_models
(
self
):
"""Returns a list of all asset models used"""
return
[
self
.
toolchain_model
]
def
_load_json
(
self
,
json_object
):
"""Load the json object passed as parameter"""
...
...
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