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
48ee1ecc
Commit
48ee1ecc
authored
14 years ago
by
Michael Whitty
Browse files
Options
Downloads
Patches
Plain Diff
refs #2192 - fix for SofQw test failure?
parent
6a843aa5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/Framework/API/src/WorkspaceFactory.cpp
+12
-10
12 additions, 10 deletions
Code/Mantid/Framework/API/src/WorkspaceFactory.cpp
with
12 additions
and
10 deletions
Code/Mantid/Framework/API/src/WorkspaceFactory.cpp
+
12
−
10
View file @
48ee1ecc
...
@@ -102,34 +102,36 @@ void WorkspaceFactoryImpl::initializeFromParent(const MatrixWorkspace_const_sptr
...
@@ -102,34 +102,36 @@ void WorkspaceFactoryImpl::initializeFromParent(const MatrixWorkspace_const_sptr
{
{
// Only copy mask map if same size for now. Later will need to check continued validity.
// Only copy mask map if same size for now. Later will need to check continued validity.
child
->
m_masks
=
parent
->
m_masks
;
child
->
m_masks
=
parent
->
m_masks
;
}
// deal with axis
for
(
unsigned
int
i
=
0
;
i
<
parent
->
m_axes
.
size
();
++
i
)
{
const
int
newAxisLength
=
child
->
getAxis
(
i
)
->
length
();
const
int
oldAxisLength
=
parent
->
getAxis
(
i
)
->
length
();
for
(
unsigned
int
i
=
0
;
i
<
parent
->
m_axes
.
size
();
++
i
)
if
(
newAxisLength
==
oldAxisLength
)
{
{
// Need to delete the existing axis created in init above
// Need to delete the existing axis created in init above
delete
child
->
m_axes
[
i
];
delete
child
->
m_axes
[
i
];
// Now set to a copy of the parent workspace's axis
// Now set to a copy of the parent workspace's axis
child
->
m_axes
[
i
]
=
parent
->
m_axes
[
i
]
->
clone
(
child
.
get
());
child
->
m_axes
[
i
]
=
parent
->
m_axes
[
i
]
->
clone
(
child
.
get
());
}
}
}
else
else
{
// Just copy the unit and title
for
(
unsigned
int
i
=
0
;
i
<
parent
->
m_axes
.
size
();
++
i
)
{
{
if
(
!
parent
->
getAxis
(
i
)
->
isSpectra
())
if
(
!
parent
->
getAxis
(
i
)
->
isSpectra
())
{
{
int
length
=
child
->
getAxis
(
i
)
->
length
();
if
(
parent
->
getAxis
(
i
)
->
isNumeric
())
if
(
parent
->
getAxis
(
i
)
->
isNumeric
())
{
{
Mantid
::
API
::
NumericAxis
*
newAxis
=
new
Mantid
::
API
::
NumericAxis
(
l
ength
);
Mantid
::
API
::
NumericAxis
*
newAxis
=
new
Mantid
::
API
::
NumericAxis
(
newAxisL
ength
);
child
->
replaceAxis
(
i
,
newAxis
);
child
->
replaceAxis
(
i
,
newAxis
);
child
->
getAxis
(
i
)
->
unit
()
=
parent
->
getAxis
(
i
)
->
unit
();
child
->
getAxis
(
i
)
->
unit
()
=
parent
->
getAxis
(
i
)
->
unit
();
}
}
if
(
parent
->
getAxis
(
i
)
->
isText
())
if
(
parent
->
getAxis
(
i
)
->
isText
())
{
{
Mantid
::
API
::
TextAxis
*
newAxis
=
new
Mantid
::
API
::
TextAxis
(
l
ength
);
Mantid
::
API
::
TextAxis
*
newAxis
=
new
Mantid
::
API
::
TextAxis
(
newAxisL
ength
);
child
->
replaceAxis
(
i
,
newAxis
);
child
->
replaceAxis
(
i
,
newAxis
);
}
}
}
}
child
->
getAxis
(
i
)
->
title
()
=
parent
->
getAxis
(
i
)
->
title
();
child
->
getAxis
(
i
)
->
title
()
=
parent
->
getAxis
(
i
)
->
title
();
}
}
...
...
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