Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B-ASIC - Better ASIC Toolbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computer Engineering
B-ASIC - Better ASIC Toolbox
Commits
624dd963
Commit
624dd963
authored
2 years ago
by
Oscar Gustafsson
Browse files
Options
Downloads
Patches
Plain Diff
Load schedule without asking if there is a single schedule in the file
parent
a3aad905
No related branches found
No related tags found
1 merge request
!150
Load schedule without asking if there is a single schedule in the file
Pipeline
#88720
passed
2 years ago
Stage: test
Stage: deploy
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
b_asic/scheduler_gui/main_window.py
+22
-18
22 additions, 18 deletions
b_asic/scheduler_gui/main_window.py
with
22 additions
and
18 deletions
b_asic/scheduler_gui/main_window.py
+
22
−
18
View file @
624dd963
...
...
@@ -255,35 +255,39 @@ class MainWindow(QMainWindow, Ui_MainWindow):
self
,
self
.
tr
(
"
File not found
"
),
self
.
tr
(
"
C
ould
not find any Schedule object in file
'
{}
'
.
"
"
C
an
not find any Schedule object in file
'
{}
'
.
"
).
format
(
os
.
path
.
basename
(
abs_path_filename
)),
)
log
.
info
(
"
C
ould
not find any Schedule object in file
'
{}
'
.
"
.
format
(
"
C
an
not find any Schedule object in file
'
{}
'
.
"
.
format
(
os
.
path
.
basename
(
abs_path_filename
)
)
)
del
module
return
ret_tuple
=
QInputDialog
.
getItem
(
self
,
self
.
tr
(
"
Load object
"
),
self
.
tr
(
"
Found the following Schedule object(s) in file.
\n\n
"
"
Select an object to proceed:
"
),
schedule_obj_list
.
keys
(),
0
,
False
,
)
if
len
(
schedule_obj_list
)
==
1
:
schedule
=
[
val
for
val
in
schedule_obj_list
.
values
()][
0
]
else
:
ret_tuple
=
QInputDialog
.
getItem
(
self
,
self
.
tr
(
"
Load object
"
),
self
.
tr
(
"
Found the following Schedule objects in file.
\n\n
"
"
Select an object to proceed:
"
),
schedule_obj_list
.
keys
(),
0
,
False
,
)
if
not
ret_tuple
[
1
]:
# User canceled the operation
log
.
debug
(
"
Load schedule operation: user canceled
"
)
del
module
return
if
not
ret_tuple
[
1
]:
# User canceled the operation
log
.
debug
(
"
Load schedule operation: user canceled
"
)
del
module
return
schedule
=
schedule_obj_list
[
ret_tuple
[
0
]]
self
.
open
(
schedule
_obj_list
[
ret_tuple
[
0
]]
)
self
.
open
(
schedule
)
del
module
settings
.
setValue
(
"
mainwindow/last_opened_file
"
,
abs_path_filename
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment