Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.editor
Commits
4e1f8b37
Commit
4e1f8b37
authored
Oct 04, 2019
by
Samuel GAIST
Browse files
[widgets][assetwidget] Update new experiment editing setup since the asset is now created
parent
99dac98d
Pipeline
#34021
passed with stage
in 8 minutes and 43 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
beat/editor/test/test_assetwidget.py
View file @
4e1f8b37
...
...
@@ -226,10 +226,7 @@ class TestAssetWidget:
asset_model
.
prefix_path
=
test_prefix
target_name
=
f
"
{
user
}
/
{
toolchain_name
}
/
{
asset_name
}
"
assert
target_name
not
in
asset_model
.
stringList
()
with
pytest
.
raises
(
ValueError
):
assert
not
os
.
path
.
exists
(
asset_model
.
json_path
(
target_name
))
assert
target_name
in
asset_model
.
stringList
()
assert
asset_widget
.
save_button
.
isEnabled
()
qtbot
.
mouseClick
(
asset_widget
.
save_button
,
QtCore
.
Qt
.
LeftButton
)
...
...
beat/editor/widgets/assetwidget.py
View file @
4e1f8b37
...
...
@@ -282,12 +282,14 @@ class AssetWidget(QWidget):
asset
,
json_data
=
editor
.
createNewAsset
()
if
asset
and
json_data
:
self
.
current_asset
=
asset
# There's no file created yet
self
.
__clear_watcher
()
self
.
current_asset
=
asset
self
.
__update_content
(
json_data
)
self
.
current_editor
.
setDirty
()
self
.
save_button
.
setEnabled
(
True
)
self
.
__update_editors_icon
(
False
)
self
.
watcher
.
addPath
(
asset
.
declaration_path
)
self
.
currentAssetChanged
.
emit
(
asset
)
elif
asset
:
self
.
loadAsset
(
asset
)
...
...
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