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
cb611a6a
Unverified
Commit
cb611a6a
authored
6 years ago
by
Martyn Gigg
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #22983 from mantidproject/22087_masking_exception_fix
Fixed exception in instrument view.
parents
59f2fc77
e54dac58
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
qt/widgets/instrumentview/src/MaskBinsData.cpp
+2
-2
2 additions, 2 deletions
qt/widgets/instrumentview/src/MaskBinsData.cpp
with
2 additions
and
2 deletions
qt/widgets/instrumentview/src/MaskBinsData.cpp
+
2
−
2
View file @
cb611a6a
...
...
@@ -21,14 +21,14 @@ void MaskBinsData::addXRange(double start, double end,
void
MaskBinsData
::
mask
(
const
std
::
string
&
wsName
)
const
{
for
(
auto
mask
=
m_masks
.
begin
();
mask
!=
m_masks
.
end
();
++
mask
)
{
auto
&
spectra
=
mask
->
spectra
;
std
::
vector
<
int
>
spectraList
(
spectra
.
size
());
std
::
vector
<
int
64_t
>
spectraList
(
spectra
.
size
());
std
::
transform
(
spectra
.
cbegin
(),
spectra
.
cend
(),
spectraList
.
begin
(),
[](
const
size_t
spec
)
->
int
{
return
static_cast
<
int
>
(
spec
);
});
auto
alg
=
Mantid
::
API
::
AlgorithmManager
::
Instance
().
create
(
"MaskBins"
,
-
1
);
alg
->
setPropertyValue
(
"InputWorkspace"
,
wsName
);
alg
->
setPropertyValue
(
"OutputWorkspace"
,
wsName
);
alg
->
setProperty
(
"
SpectraLis
t"
,
spectraList
);
alg
->
setProperty
(
"
InputWorkspaceIndexSe
t"
,
spectraList
);
alg
->
setProperty
(
"XMin"
,
mask
->
start
);
alg
->
setProperty
(
"XMax"
,
mask
->
end
);
alg
->
execute
();
...
...
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