Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
37bc1234
Commit
37bc1234
authored
5 years ago
by
Giovanni Di Siena
Browse files
Options
Downloads
Patches
Plain Diff
Re #27881 Handle simultaneous workspace replacement and project recovery
parent
75f955f4
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
qt/widgets/instrumentview/src/InstrumentWidgetEncoder.cpp
+18
-15
18 additions, 15 deletions
qt/widgets/instrumentview/src/InstrumentWidgetEncoder.cpp
with
18 additions
and
15 deletions
qt/widgets/instrumentview/src/InstrumentWidgetEncoder.cpp
+
18
−
15
View file @
37bc1234
...
...
@@ -37,26 +37,29 @@ InstrumentWidgetEncoder::encode(const InstrumentWidget &obj,
const
QString
&
projectPath
,
const
bool
saveMask
)
{
QMap
<
QString
,
QVariant
>
map
;
m_projectPath
=
projectPath
.
toStdString
();
m_saveMask
=
saveMask
;
// there is no reference to the workspace if it is being replaced, so return
// the empty map
if
(
!
obj
.
isWsBeingReplaced
())
{
m_projectPath
=
projectPath
.
toStdString
();
m_saveMask
=
saveMask
;
map
.
insert
(
QString
(
"workspaceName"
),
QVariant
(
obj
.
getWorkspaceName
()));
map
.
insert
(
QString
(
"workspaceName"
),
QVariant
(
obj
.
getWorkspaceName
()));
map
.
insert
(
QString
(
"surfaceType"
),
QVariant
(
obj
.
getSurfaceType
()));
map
.
insert
(
QString
(
"surfaceType"
),
QVariant
(
obj
.
getSurfaceType
()));
map
.
insert
(
QString
(
"currentTab"
),
QVariant
(
obj
.
getCurrentTab
()));
map
.
insert
(
QString
(
"currentTab"
),
QVariant
(
obj
.
getCurrentTab
()));
QList
<
QVariant
>
energyTransferList
;
energyTransferList
.
append
(
QVariant
(
obj
.
m_xIntegration
->
getMinimum
()));
energyTransferList
.
append
(
QVariant
(
obj
.
m_xIntegration
->
getMaximum
()));
map
.
insert
(
QString
(
"energyTransfer"
),
QVariant
(
energyTransferList
));
map
.
insert
(
QString
(
"surface"
),
QVariant
(
this
->
encodeSurface
(
obj
.
getSurface
())));
map
.
insert
(
QString
(
"actor"
),
QVariant
(
this
->
encodeActor
(
obj
.
m_instrumentActor
)));
map
.
insert
(
QString
(
"tabs"
),
QVariant
(
this
->
encodeTabs
(
obj
)));
QList
<
QVariant
>
energyTransferList
;
energyTransferList
.
append
(
QVariant
(
obj
.
m_xIntegration
->
getMinimum
()));
energyTransferList
.
append
(
QVariant
(
obj
.
m_xIntegration
->
getMaximum
()));
map
.
insert
(
QString
(
"energyTransfer"
),
QVariant
(
energyTransferList
));
map
.
insert
(
QString
(
"surface"
),
QVariant
(
this
->
encodeSurface
(
obj
.
getSurface
())));
map
.
insert
(
QString
(
"actor"
),
QVariant
(
this
->
encodeActor
(
obj
.
m_instrumentActor
)));
map
.
insert
(
QString
(
"tabs"
),
QVariant
(
this
->
encodeTabs
(
obj
)));
}
return
map
;
}
...
...
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