Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
mlz
BornAgain
Commits
87064cca
Commit
87064cca
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
disambiguate accessor fcts
parent
3bb41d8c
No related branches found
No related tags found
1 merge request
!2338
cleanup JobsSet
Pipeline
#128579
passed
1 year ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/Model/Tune/JobsSet.h
+2
-2
2 additions, 2 deletions
GUI/Model/Tune/JobsSet.h
GUI/View/JobControl/JobListing.cpp
+2
-2
2 additions, 2 deletions
GUI/View/JobControl/JobListing.cpp
with
4 additions
and
4 deletions
GUI/Model/Tune/JobsSet.h
+
2
−
2
View file @
87064cca
...
...
@@ -61,8 +61,8 @@ public:
void
cancelJob
(
JobItem
*
job_item
);
void
removeJob
(
JobItem
*
job_item
);
int
selected
Index
()
const
{
return
m_selected_index
;
}
void
set
Selected
Index
(
int
index
)
{
m_selected_index
=
index
;
}
int
currentJob
Index
()
const
{
return
m_selected_index
;
}
void
set
Job
Index
(
int
index
)
{
m_selected_index
=
index
;
}
signals
:
void
jobSelected
(
JobItem
*
item
);
...
...
This diff is collapsed.
Click to expand it.
GUI/View/JobControl/JobListing.cpp
+
2
−
2
View file @
87064cca
...
...
@@ -141,7 +141,7 @@ void JobListing::onItemSelectionChanged()
QModelIndexList
selected
=
m_list_view
->
selectionModel
()
->
selectedIndexes
();
if
(
selected
.
size
()
==
1
)
gDoc
->
jobsSet
()
->
set
Selected
Index
(
selected
.
first
().
row
());
gDoc
->
jobsSet
()
->
set
Job
Index
(
selected
.
first
().
row
());
emit
selectedJobsChanged
(
selectedJobItems
());
}
...
...
@@ -271,7 +271,7 @@ void JobListing::ensureItemSelected(int lastSelectedRow)
void
JobListing
::
restoreSelection
()
{
int
lastUsed
=
gDoc
->
jobsSet
()
->
selected
Index
();
int
lastUsed
=
gDoc
->
jobsSet
()
->
currentJob
Index
();
if
(
lastUsed
>=
0
&&
lastUsed
<
m_model
->
rowCount
())
{
QModelIndex
lastUsedIndex
=
m_model
->
index
(
lastUsed
,
0
,
QModelIndex
());
m_list_view
->
selectionModel
()
->
select
(
lastUsedIndex
,
QItemSelectionModel
::
ClearAndSelect
);
...
...
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